diff --git a/modules/angular2/src/core/annotations/decorators.ts b/modules/angular2/src/core/annotations/decorators.ts index 7359ab518d..c101f8be45 100644 --- a/modules/angular2/src/core/annotations/decorators.ts +++ b/modules/angular2/src/core/annotations/decorators.ts @@ -9,6 +9,8 @@ import {AttributeAnnotation, QueryAnnotation} from './di'; import {makeDecorator, makeParamDecorator, TypeDecorator, Class} from '../../util/decorators'; import {Type} from 'angular2/src/facade/lang'; +export {ClassDefinition, TypeDecorator} from '../../util/decorators'; + export interface DirectiveTypeDecorator extends TypeDecorator {} export interface ComponentTypeDecorator extends TypeDecorator { @@ -17,28 +19,28 @@ export interface ComponentTypeDecorator extends TypeDecorator { export interface ViewTypeDecorator extends TypeDecorator { View(obj: ViewArgs): ViewTypeDecorator } -export interface Directive { +export interface IDirective { (obj: DirectiveArgs): DirectiveTypeDecorator; new (obj: DirectiveAnnotation): DirectiveAnnotation; } -export interface Component { +export interface IComponent { (obj: ComponentArgs): ComponentTypeDecorator; new (obj: ComponentAnnotation): ComponentAnnotation; } -export interface View { +export interface IView { (obj: ViewArgs): ViewTypeDecorator; new (obj: ViewArgs): ViewAnnotation; } /* from annotations */ -export var Component = makeDecorator(ComponentAnnotation, (fn: any) => fn.View = View); -export var Directive = makeDecorator(DirectiveAnnotation); +export var Component: IComponent = makeDecorator(ComponentAnnotation, (fn: any) => fn.View = View); +export var Directive: IDirective = makeDecorator(DirectiveAnnotation); /* from view */ -export var View = makeDecorator(ViewAnnotation, (fn: any) => fn.View = View); +export var View: IView = makeDecorator(ViewAnnotation, (fn: any) => fn.View = View); /* from di */ export var Attribute = makeParamDecorator(AttributeAnnotation);