chore: improve angular2.d.ts file

- support ambient and import format for .d.ts
This commit is contained in:
Misko Hevery
2015-07-02 22:26:07 +02:00
committed by Alex Eagle
parent 65a767d9b0
commit 0052c6b120
4 changed files with 50 additions and 25 deletions

View File

@ -6,11 +6,13 @@ export interface ClassDefinition {
}
export interface TypeDecorator {
(cls: any): any;
<T>(cls: T): T;
annotations: Array<any>;
Class(obj: ClassDefinition): Type;
}
export interface ParamaterDecorator { (cls: Type, unusedKey: any, index: number): void }
function extractAnnotation(annotation: any): any {
if (isFunction(annotation) && annotation.hasOwnProperty('annotation')) {
// it is a decorator, extract annotation