Enable type checking for constant and value (#8885)

Using a generic type one can type check the `constant` or `value` in angular.module.
This commit is contained in:
Pekka Leppänen
2016-04-12 22:32:17 +09:00
committed by Masahiro Wakame
parent be1056420e
commit fa3294c560
+2 -2
View File
@@ -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<T>(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<T>(name: string, value: T): IModule;
value(object: Object): IModule;
/**