import { MMKV } from 'react-native-mmkv'; import { AnyRecord } from '@codeleap/types'; type StorageKey> = keyof T | (string & {}) | ((allKeys: T) => string) | [keyof T, any]; /** * Wraps `react-native-mmkv`, which is fully synchronous — reads and writes block the JS thread for microseconds but never return Promises, unlike AsyncStorage. Each `StorageManager` instance creates its own MMKV database file; if you need encryption, pass an `id` and `encryptionKey` to `new MMKV(options)` here before sharing the instance across the app. * * Objects are round-tripped through `JSON.stringify`/`JSON.parse`; non-serialisable values (class instances, functions) will silently lose their prototype on read-back. */ export declare class StorageManager> { instance: MMKV; storageKeys: T; constructor(keys: T); getStorageKey(key: StorageKey): string; private parseValue; exists(key: StorageKey): boolean; get(key: StorageKey, type: 'string'): string | undefined; get(key: StorageKey, type: 'number'): number | undefined; get(key: StorageKey, type: 'boolean'): boolean | undefined; get(key: StorageKey): V | undefined; set(key: StorageKey, value: V): void; remove(key: StorageKey): void; multiRemove(keys: Array>): void; multiGet(keys: Array>): Partial>; } export {}; //# sourceMappingURL=StorageManager.d.ts.map