Created
May 26, 2018 16:47
-
-
Save jahson/f6470fd9a043ed0abc7fa25560eb1f3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace I18NextLocalStorageBackend { | |
interface BackendOptions { | |
prefix?: string; // prefix for stored langs | |
expirationTime?: number; | |
versions: any; | |
} | |
type LoadCallback = (error: any, result: string | false) => void; | |
} | |
declare class I18NextLocalStorageBackend { | |
constructor( | |
services?: any, | |
options?: I18NextLocalStorageBackend.BackendOptions | |
); | |
init(options?: I18NextLocalStorageBackend.BackendOptions): void; | |
read( | |
language: string, | |
namespace: string, | |
callback: I18NextLocalStorageBackend.LoadCallback | |
): void; | |
save(language: string, namespace: string, data: any): void; | |
type: 'backend'; | |
services: any; | |
options: I18NextLocalStorageBackend.BackendOptions; | |
} | |
export = I18NextLocalStorageBackend; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment