chore: improve angular2.d.ts file
- support ambient and import format for .d.ts
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user