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

View File

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