Skip to content

Commit

Permalink
fix: changed MMKVConfiguration to import type
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeistrich committed Feb 8, 2024
1 parent 1d6f98a commit 4822a59
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions src/observableInterfaces.ts
Original file line number Diff line number Diff line change
@@ -1,45 +1,9 @@
import type { symbolGetNode, symbolOpaque } from './globals';
type MMKVConfiguration = import('react-native-mmkv').MMKVConfiguration;
type AsyncStorageStatic = import('@react-native-async-storage/async-storage').AsyncStorageStatic;
type DatabaseReference = import('firebase/database').DatabaseReference;
type Query = import('firebase/database').Query;

// Copied from import { MMKVConfiguration } from 'react-native-mmkv';
// so we don't have to import it
interface MMKVConfiguration {
/**
* The MMKV instance's ID. If you want to use multiple instances, make sure to use different IDs!
*
* @example
* ```ts
* const userStorage = new MMKV({ id: `user-${userId}-storage` })
* const globalStorage = new MMKV({ id: 'global-app-storage' })
* ```
*
* @default 'mmkv.default'
*/
id: string;
/**
* The MMKV instance's root path. By default, MMKV stores file inside `$(Documents)/mmkv/`. You can customize MMKV's root directory on MMKV initialization:
*
* @example
* ```ts
* const temporaryStorage = new MMKV({ path: '/tmp/' })
* ```
*/
path?: string;
/**
* 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.
*
* Encryption keys can have a maximum length of 16 bytes.
*
* @example
* ```ts
* const secureStorage = new MMKV({ encryptionKey: 'my-encryption-key!' })
* ```
*/
encryptionKey?: string;
}

type Nullable<T> = T | null | undefined;
export type TrackingType = undefined | true | symbol; // true === shallow

Expand Down

0 comments on commit 4822a59

Please sign in to comment.