mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Fixing ICacheObject::get return type (#29001)
get can return undefined if the key isn't in the cache. See the example: https://docs.angularjs.org/api/ng/type/$cacheFactory.Cache ``` superCache.remove('another key'); expect(superCache.get('another key')).toBeUndefined(); ```
This commit is contained in:
parent
82af488938
commit
58d87fc9d4
2
types/angular/index.d.ts
vendored
2
types/angular/index.d.ts
vendored
@ -1316,7 +1316,7 @@ declare namespace angular {
|
||||
*
|
||||
* @param key the key of the data to be retrieved
|
||||
*/
|
||||
get<T>(key: string): T;
|
||||
get<T>(key: string): T | undefined;
|
||||
|
||||
/**
|
||||
* Removes an entry from the Cache object.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user