mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
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:
committed by
Masahiro Wakame
parent
be1056420e
commit
fa3294c560
Vendored
+2
-2
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user