From c7684b4098da60a75299aa026a443f293c5a57f1 Mon Sep 17 00:00:00 2001 From: Chris Woolum Date: Fri, 17 Apr 2015 11:14:54 -0700 Subject: [PATCH] Make the methods generic instead of the interface Making the interface generic limits it to only one data type. By making the get and set methods generic, you can use multiple data types on the same service --- angular-local-storage/angular-local-storage.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/angular-local-storage/angular-local-storage.d.ts b/angular-local-storage/angular-local-storage.d.ts index d40630a2a..374f57af0 100644 --- a/angular-local-storage/angular-local-storage.d.ts +++ b/angular-local-storage/angular-local-storage.d.ts @@ -75,7 +75,7 @@ declare module angular.local.storage { } - interface ILocalStorageService { + interface ILocalStorageService { /** * Checks if the browser support the current storage type(e.g: localStorage, sessionStorage). * Returns: Boolean @@ -92,14 +92,14 @@ declare module angular.local.storage { * @param key * @param value */ - set(key: string, value: T): boolean; + set(key: string, value: T): boolean; /** * Directly get a value from local storage. * If local storage is not supported, use cookies instead. * Returns: value from local storage * @param key */ - get(key: string): T; + get(key: string): T; /** * Return array of keys for local storage, ignore keys that not owned. * Returns: value from local storage