Fixed Type definition to match the actual implementation (#37556)

Now you are able to remove from the `Session Storage`. As the previous implementation only removed from the local storage ( or whatever the current storage type was provided), this was not inline with the underlying implementation.
This commit is contained in:
Fahad Mansoor
2019-08-19 12:57:27 -07:00
committed by Sheetal Nandi
parent d3a31dec76
commit f0708acb4b
+7 -3
View File
@@ -129,13 +129,17 @@ declare module 'angular' {
* Returns: value from local storage
*/
keys(storageType?: StorageType): string[];
/**
* Remove an item from local storage by key.
/**
* Remove a list of items from the local storage by their given keys.
* The last item in the variable argument list can optionally be the StorageType.
* Which specifies whether to remove from the session storage or the local storage.
* If the last argument is not a valid storage type it is considered to be a key,
* and localStorage is used by default .
* If local storage is not supported, use cookies instead.
* Returns: Boolean
* @param key
*/
remove(key: string): boolean;
remove(...args: string[]): boolean;
/**
* Remove all data for this app from local storage.
* If local storage is not supported, use cookies instead.