From 58d87fc9d4eb08538df5a5cb490d6ffddd65e8a3 Mon Sep 17 00:00:00 2001 From: barrtender Date: Tue, 18 Sep 2018 15:24:08 -0700 Subject: [PATCH] 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(); ``` --- types/angular/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index 99977b57b5..fe90fa15b8 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -1316,7 +1316,7 @@ declare namespace angular { * * @param key the key of the data to be retrieved */ - get(key: string): T; + get(key: string): T | undefined; /** * Removes an entry from the Cache object.