From 7e352a27f7172a80cfc5aefa6296ebbaca8df450 Mon Sep 17 00:00:00 2001 From: opensrcken Date: Tue, 31 May 2016 18:25:48 -0700 Subject: [PATCH] fix(d.ts): enable angular2 compilation with TS flag --strictNullChecks (#8902) Eliminate the following compiler error when using TS 1.9+ with strict null checking enabled: node_modules/@angular/core/src/util/decorators.d.ts(9,5): error TS2411: Property 'extends' of type 'Type | undefined' is not assignable to string index type 'Type | Function | any[]'. https://github.com/angular/angular/issues/8720 --- modules/@angular/core/src/util/decorators.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/@angular/core/src/util/decorators.ts b/modules/@angular/core/src/util/decorators.ts index 76899049a5..1c1f5093af 100644 --- a/modules/@angular/core/src/util/decorators.ts +++ b/modules/@angular/core/src/util/decorators.ts @@ -26,7 +26,7 @@ export interface ClassDefinition { * Other methods on the class. Note that values should have type 'Function' but TS requires * all properties to have a narrower type than the index signature. */ - [x: string]: Type | Function | any[]; + [x: string]: Type | Function | any[] | undefined; } /**