From fa3294c560ee49f4af43e02a62e3f4b5b6bbe5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pekka=20Lepp=C3=A4nen?= Date: Tue, 12 Apr 2016 16:32:17 +0300 Subject: [PATCH] Enable type checking for constant and value (#8885) Using a generic type one can type check the `constant` or `value` in angular.module. --- angularjs/angular.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index e86fd37052..3d2b248637 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -204,7 +204,7 @@ declare namespace angular { * @param name The name of the constant. * @param value The constant value. */ - constant(name: string, value: any): IModule; + constant(name: string, value: T): IModule; constant(object: Object): IModule; /** * The $controller service is used by Angular to create new controllers. @@ -294,7 +294,7 @@ declare namespace angular { * @param name The name of the instance. * @param value The value. */ - value(name: string, value: any): IModule; + value(name: string, value: T): IModule; value(object: Object): IModule; /**