mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Type AsyncStorage
Summary: Types the AsyncStorage module with Flow. Changelog: [Internal] Reviewed By: MichaReiser Differential Revision: D25884607 fbshipit-source-id: 7762ebfc68b87e6c5a0d8100fcc564f002061f5c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c42a59af7e
commit
05e380f26c
@@ -14,29 +14,32 @@ import type {TurboModule} from '../TurboModule/RCTExport';
|
||||
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
+getConstants: () => {||};
|
||||
+getConstants: () => {};
|
||||
+multiGet: (
|
||||
keys: Array<string>,
|
||||
callback: (
|
||||
errors: ?Array<{|message: string|}>,
|
||||
errors: ?Array<{message: string, key?: string}>,
|
||||
kvPairs: ?Array<Array<string>>,
|
||||
) => void,
|
||||
) => void;
|
||||
+multiSet: (
|
||||
kvPairs: Array<Array<string>>,
|
||||
callback: (errors: ?Array<{|message: string|}>) => void,
|
||||
callback: (errors: ?Array<{message: string, key?: string}>) => void,
|
||||
) => void;
|
||||
+multiMerge: (
|
||||
kvPairs: Array<Array<string>>,
|
||||
callback: (errors: ?Array<{|message: string|}>) => void,
|
||||
callback: (errors: ?Array<{message: string, key?: string}>) => void,
|
||||
) => void;
|
||||
+multiRemove: (
|
||||
keys: Array<string>,
|
||||
callback: (errors: ?Array<{|message: string|}>) => void,
|
||||
callback: (errors: ?Array<{message: string, key?: string}>) => void,
|
||||
) => void;
|
||||
+clear: (callback: (error: {|message: string|}) => void) => void;
|
||||
+clear: (callback: (error: {message: string, key?: string}) => void) => void;
|
||||
+getAllKeys: (
|
||||
callback: (error: ?{|message: string|}, allKeys: ?Array<string>) => void,
|
||||
callback: (
|
||||
error: ?{message: string, key?: string},
|
||||
allKeys: ?Array<string>,
|
||||
) => void,
|
||||
) => void;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user