chore(build): Upgrade to TypeScript@1.5.3
This change also makes us compliant with 1.6.0-dev compiler, so we can do some experiments with apps that use 1.6 features and compile against Angular. We should probably add a travis build for 1.6 so we stay compatible with both versions.
This commit is contained in:
@@ -49,6 +49,12 @@ export interface TypeDecorator {
|
||||
*/
|
||||
<T extends Type>(type: T): T;
|
||||
|
||||
// Make TypeDecorator assignable to built-in ParameterDecorator type.
|
||||
// ParameterDecorator is declared in lib.d.ts as a `declare type`
|
||||
// so we cannot declare this interface as a subtype.
|
||||
// see https://github.com/angular/angular/issues/3379#issuecomment-126169417
|
||||
(target: Object, propertyKey: string | symbol, parameterIndex: number): void;
|
||||
|
||||
/**
|
||||
* Storage for the accumulated annotations so far used by the DSL syntax.
|
||||
*
|
||||
@@ -62,17 +68,6 @@ export interface TypeDecorator {
|
||||
Class(obj: ClassDefinition): Type;
|
||||
}
|
||||
|
||||
/**
|
||||
* An interface implemented by all Angular parameter decorators, which allows them to be used as ES7
|
||||
* decorators.
|
||||
*/
|
||||
export interface ParameterDecorator {
|
||||
/**
|
||||
* Invoke as ES7 decorator.
|
||||
*/
|
||||
(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