From 90d7feb531e0935de1eebbac1bb5bedf8ab5ccc1 Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Fri, 24 Jul 2015 18:18:58 -0400 Subject: [PATCH] Correct misunderstanding of documentation --- angular-localForage/angular-localForage.d.ts | 4 ++-- localForage/localForage.d.ts | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/angular-localForage/angular-localForage.d.ts b/angular-localForage/angular-localForage.d.ts index ee2aeeb6d8..c7a8f7daee 100644 --- a/angular-localForage/angular-localForage.d.ts +++ b/angular-localForage/angular-localForage.d.ts @@ -22,8 +22,8 @@ declare module angular.localForage { } interface ILocalForageService { - setDriver(driver:string):angular.IPromise; - driver():lf.ILocalForage; + driver(): LocalForageDriver; + setDriver(name: string | string[]): angular.IPromise; setItem(key:string, value:any):angular.IPromise; setItem(keys:Array, values:Array):angular.IPromise; diff --git a/localForage/localForage.d.ts b/localForage/localForage.d.ts index 6deef52770..d169d01e3f 100644 --- a/localForage/localForage.d.ts +++ b/localForage/localForage.d.ts @@ -42,14 +42,17 @@ interface LocalForageDriver { } interface LocalForage { - LOCALSTORAGE: LocalForageDriver; - WEBSQL: LocalForageDriver; - INDEXEDDB: LocalForageDriver; + LOCALSTORAGE: string; + WEBSQL: string; + INDEXEDDB: string; config(options: LocalForageOptions): void; - setDriver(driver: LocalForageDriver): void; - setDriver(driver: LocalForageDriver[]): void; + driver(): LocalForageDriver; + setDriver(driver: string | string[]): Promise; + setDriver(driver: string | string[], callback: () => void, errorCallback: (error: any) => void): void; + defineDriver(driver: LocalForageDriver): Promise; + defineDriver(driver: LocalForageDriver, callback: () => void, errorCallback: (error: any) => void): void; getItem(key: string): Promise; getItem(key: string, callback: (err: any, value: T) => void): void;