UNPKG

@react-native-ohos/react-native-mmkv-storage

Version:

This library aims to provide a fast & reliable solution for you data storage needs in react-native apps. It uses [MMKV](https://github.com/Tencent/MMKV) by Tencent under the hood on Android and iOS both that is used by their WeChat app(more than 1 Billion

28 lines 1.17 kB
/** * * A handler function used to handle all the * calls made to native code. The purpose is * to make sure that the storage is initialized * before any read/write requests are sent to the * MMKV instance. * * * @param action The native function that will be called * @param args Arguments for the native function */ export declare function handleAction<T extends (...args: any[]) => any | undefined | null>(action: T, ...args: any[]): ReturnType<T> | undefined; /** * * A handler function used to handle all the * calls made to native code. The purpose is * to make sure that the storage is initialized * before any read/write requests are sent to the * MMKV instance. * * * @param action The native function that will be called * @param args Arguments for the native function */ export declare function handleActionAsync<T extends (...args: any[]) => any | undefined | null>(action: T, ...args: any[]): Promise<ReturnType<T> | undefined | null>; export declare function handlePromise<T extends (...args: any[]) => any | undefined | null>(action: T, ...args: any[]): Promise<ReturnType<T> | undefined>; //# sourceMappingURL=handlers.d.ts.map