Values in localStorage are not only strings

The user of the lib can put all types of values into localStorage. So the ILocalStorageService should be a generic.
This commit is contained in:
Maik
2015-01-05 12:32:37 +01:00
parent 494b30d232
commit 398cc1eb89
+3 -3
View File
@@ -75,7 +75,7 @@ declare module ng.local.storage {
}
interface ILocalStorageService {
interface ILocalStorageService<T> {
/**
* Checks if the browser support the current storage type(e.g: localStorage, sessionStorage).
* Returns: Boolean
@@ -99,7 +99,7 @@ declare module ng.local.storage {
* Returns: value from local storage
* @param key
*/
get(key: string): string;
get(key: string): T;
/**
* Return array of keys for local storage, ignore keys that not owned.
* Returns: value from local storage
@@ -146,4 +146,4 @@ declare module ng.local.storage {
*/
cookie:ICookie;
}
}
}