File tree Expand file tree Collapse file tree 3 files changed +32
-14
lines changed
modules/core/src/annotations Expand file tree Collapse file tree 3 files changed +32
-14
lines changed Original file line number Diff line number Diff line change 11import { Directive } from './directive' ;
2+ import { ABSTRACT , CONST } from 'facade/lang' ;
23
34export class Component extends Directive {
5+ @CONST ( )
46 constructor ( {
57 selector,
8+ lightDomServices,
9+ implementsTypes,
610 template,
711 elementServices,
8- componentServices,
9- implementsTypes
12+ componentServices
1013 } :{
1114 selector :String ,
1215 template :TemplateConfig ,
@@ -16,7 +19,13 @@ export class Component extends Directive {
1619 implementsTypes :Array < Type >
1720 } )
1821 {
19- // super({selector, lightDomServices, implementsTypes});
22+ super ( {
23+ selector : selector ,
24+ lightDomServices : lightDomServices ,
25+ implementsTypes : implementsTypes } ) ;
26+ this . template = template ;
27+ this . elementServices = elementServices ;
28+ this . componentServices = componentServices ;
2029 }
2130}
2231
@@ -62,4 +71,4 @@ CompA ShadowDOM:
6271
6372CompB SHadowDOM:
6473<div></div>
65- */
74+ */
Original file line number Diff line number Diff line change 11// import {Type} from 'facade/lang';
22// import {ElementServicesFunction} from './facade';
3- import { ABSTRACT } from 'facade/lang' ;
3+ import { ABSTRACT , CONST } from 'facade/lang' ;
44
55
66@ABSTRACT ( )
77export class Directive {
8- constructor ( {
8+ @CONST ( )
9+ constructor ( {
910 selector,
1011 lightDomServices,
1112 implementsTypes
12- } /* :{
13+ } :{
1314 selector :String ,
1415 lightDomServices :ElementServicesFunction ,
1516 implementsTypes :Array < Type >
16- }*/ )
17+ } )
1718 {
19+ this. selector = selector ;
1820 this . lightDomServices = lightDomServices ;
19- this . selector = selector ;
20- }
21+ this . implementsTypes = implementsTypes ;
22+ }
2123}
Original file line number Diff line number Diff line change 1+ import { ABSTRACT , CONST } from 'facade/lang' ;
12// import {Type, List} from 'facade/lang';
23
34export class TemplateConfig {
5+ @CONST ( )
46 constructor ( {
57 url,
68 directives,
79 formatters,
810 source
9- } /* : {
11+ } : {
1012 url : String ,
1113 directives : List < Type > ,
1214 formatters : List < Type > ,
1315 source : List < TemplateConfig >
14- }*/ )
15- { }
16- }
16+ } )
17+ {
18+ this. url = url ;
19+ this . directives = directives ;
20+ this . formatters = formatters ;
21+ this . source = source ;
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments