From 30e25acb9fb8c137d9ec62ef57a5e3b1ecacec05 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 10 Dec 2015 03:30:13 -0800 Subject: [PATCH] fix(core): workaround for typescript@1.7.3 breakage #5784 I don't understand why I need to declare the type-here, but it resolves the issue. Looks like a bug in tsc. Fixes #5784 --- modules/angular2/src/core/metadata/di.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/angular2/src/core/metadata/di.ts b/modules/angular2/src/core/metadata/di.ts index a4dbf8363d..4403735ff0 100644 --- a/modules/angular2/src/core/metadata/di.ts +++ b/modules/angular2/src/core/metadata/di.ts @@ -32,7 +32,7 @@ import {DependencyMetadata} from 'angular2/src/core/di/metadata'; export class AttributeMetadata extends DependencyMetadata { constructor(public attributeName: string) { super(); } - get token() { + get token(): AttributeMetadata { // Normally one would default a token to a type of an injected value but here // the type of a variable is "string" and we can't use primitive type as a return value // so we use instance of Attribute instead. This doesn't matter much in practice as arguments