@legendapp/state 2.1.5 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,40 +1,7 @@
|
|
|
1
|
+
import type { MMKVConfiguration } from 'react-native-mmkv';
|
|
1
2
|
import type { AsyncStorageStatic } from '@react-native-async-storage/async-storage';
|
|
3
|
+
import type { DatabaseReference, Query } from 'firebase/database';
|
|
2
4
|
import type { symbolGetNode, symbolOpaque } from './globals';
|
|
3
|
-
import { DatabaseReference, Query } from 'firebase/database';
|
|
4
|
-
interface MMKVConfiguration {
|
|
5
|
-
/**
|
|
6
|
-
* The MMKV instance's ID. If you want to use multiple instances, make sure to use different IDs!
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* const userStorage = new MMKV({ id: `user-${userId}-storage` })
|
|
11
|
-
* const globalStorage = new MMKV({ id: 'global-app-storage' })
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* @default 'mmkv.default'
|
|
15
|
-
*/
|
|
16
|
-
id: string;
|
|
17
|
-
/**
|
|
18
|
-
* The MMKV instance's root path. By default, MMKV stores file inside `$(Documents)/mmkv/`. You can customize MMKV's root directory on MMKV initialization:
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```ts
|
|
22
|
-
* const temporaryStorage = new MMKV({ path: '/tmp/' })
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
path?: string;
|
|
26
|
-
/**
|
|
27
|
-
* The MMKV instance's encryption/decryption key. By default, MMKV stores all key-values in plain text on file, relying on iOS's sandbox to make sure the file is encrypted. Should you worry about information leaking, you can choose to encrypt MMKV.
|
|
28
|
-
*
|
|
29
|
-
* Encryption keys can have a maximum length of 16 bytes.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const secureStorage = new MMKV({ encryptionKey: 'my-encryption-key!' })
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
encryptionKey?: string;
|
|
37
|
-
}
|
|
38
5
|
type Nullable<T> = T | null | undefined;
|
|
39
6
|
export type TrackingType = undefined | true | symbol;
|
|
40
7
|
export interface MapGet<T extends Map<any, any> | WeakMap<any, any>> {
|