TypeDecorator

export interface TypeDecorator

exported from angular2/core defined in angular2/src/core/util/decorators.ts (line 28)

An interface implemented by all Angular type decorators, which allows them to be used as ES7 decorators as well as Angular DSL syntax.

DSL syntax:

var MyClass = ng .Component({...}) .View({...}) .Class({...});

ES7 syntax:

@ng.Component({...}) @ng.View({...}) class MyClass {...}

Members

annotations : any[]

Storage for the accumulated annotations so far used by the DSL syntax.

Used by Class to annotate the generated class.

Class(obj: ClassDefinition) : ConcreteType

Generate a class from the definition and annotate it with TypeDecorator.