Installation
npm install --save @types/sync-storage
Summary
This package contains type definitions for sync-storage (https://github.com/raphaelpor/sync-storage).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sync-storage.
index.d.ts
/*
* Init prepares the SyncStorage to work synchronously, by getting all values for all keys previously saved on RN AsyncStorage.
*/
export function init(): void;
/*
* Returns value of key
*/
export function get(key: string): any;
/*
* Saves value in memory and AsyncStorage. Also returns a promise for verification.
*/
export function set(key: string, value: any): Promise<void>;
/*
* Removes value from memory and AsyncStorage. Also returns a promise.
*/
export function remove(key: string): Promise<void>;
/*
* Returns all stored keys in an array.
*/
export function getAllKeys(): any[];
export as namespace SyncStorage;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: none
Credits
These definitions were written by Dannomac.