fix: Enabled annotation support for Dart

This commit is contained in:
Misko Hevery 2014-10-02 21:48:46 -07:00
parent cbd429640f
commit 6c8da62c1b
3 changed files with 32 additions and 14 deletions

View File

@ -1,12 +1,15 @@
import {Directive} from './directive';
import {ABSTRACT, CONST} from 'facade/lang';
export class Component extends Directive {
@CONST()
constructor({
selector,
lightDomServices,
implementsTypes,
template,
elementServices,
componentServices,
implementsTypes
componentServices
}:{
selector:String,
template:TemplateConfig,
@ -16,7 +19,13 @@ export class Component extends Directive {
implementsTypes:Array<Type>
})
{
// super({selector, lightDomServices, implementsTypes});
super({
selector: selector,
lightDomServices: lightDomServices,
implementsTypes: implementsTypes});
this.template = template;
this.elementServices = elementServices;
this.componentServices = componentServices;
}
}

View File

@ -1,21 +1,23 @@
// import {Type} from 'facade/lang';
// import {ElementServicesFunction} from './facade';
import {ABSTRACT} from 'facade/lang';
import {ABSTRACT, CONST} from 'facade/lang';
@ABSTRACT()
export class Directive {
@CONST()
constructor({
selector,
lightDomServices,
implementsTypes
}/*:{
}:{
selector:String,
lightDomServices:ElementServicesFunction,
implementsTypes:Array<Type>
}*/)
})
{
this.lightDomServices = lightDomServices;
this.selector = selector;
this.lightDomServices = lightDomServices;
this.implementsTypes = implementsTypes;
}
}

View File

@ -1,16 +1,23 @@
import {ABSTRACT, CONST} from 'facade/lang';
// import {Type, List} from 'facade/lang';
export class TemplateConfig {
@CONST()
constructor({
url,
directives,
formatters,
source
}/*: {
}: {
url: String,
directives: List<Type>,
formatters: List<Type>,
source: List<TemplateConfig>
}*/)
{}
})
{
this.url = url;
this.directives = directives;
this.formatters = formatters;
this.source = source;
}
}