Skip to content

Commit 6c8da62

Browse files
committed
fix: Enabled annotation support for Dart
1 parent cbd4296 commit 6c8da62

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

modules/core/src/annotations/component.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import {Directive} from './directive';
2+
import {ABSTRACT, CONST} from 'facade/lang';
23

34
export 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
6372
CompB SHadowDOM:
6473
<div></div>
65-
*/
74+
*/
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
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()
77
export 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
}
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1+
import {ABSTRACT, CONST} from 'facade/lang';
12
// import {Type, List} from 'facade/lang';
23

34
export 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+
}

0 commit comments

Comments
 (0)