diff --git a/src/AsyncStorage.native.ts b/src/AsyncStorage.native.ts index 9def456d..45673f1a 100644 --- a/src/AsyncStorage.native.ts +++ b/src/AsyncStorage.native.ts @@ -269,7 +269,7 @@ const AsyncStorage = ((): AsyncStorageStatic => { reject: null as any, }; - const promiseResult = new Promise( + const promiseResult = new Promise( (resolve, reject) => { getRequest.resolve = resolve; getRequest.reject = reject; diff --git a/src/types.ts b/src/types.ts index 1eafd0ca..a4e543da 100644 --- a/src/types.ts +++ b/src/types.ts @@ -23,7 +23,7 @@ export type MultiRequest = { keys: readonly string[]; callback?: MultiGetCallback; keyIndex: number; - resolve?: (result?: readonly KeyValuePair[]) => void; + resolve?: (result: readonly KeyValuePair[]) => void; reject?: (error?: any) => void; }; @@ -125,7 +125,7 @@ export type AsyncStorageStatic = { multiGet: ( keys: string[], callback?: MultiGetCallback - ) => Promise; + ) => Promise; /** * Use this as a batch operation for storing multiple key-value pairs. When