Skip to content

Commit 344fa12

Browse files
lukewlmsDenisSolution
authored andcommitted
fix: update TS types for multiGet
Per issue: react-native-async-storage/async-storage#58 `multiGet` types should allow returning `string | null`, not just string.
1 parent bacce14 commit 344fa12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ declare module '@react-native-community/async-storage' {
5151
*/
5252
multiGet(
5353
keys: string[],
54-
callback?: (errors?: Error[], result?: [string, string][]) => void
55-
): Promise<[string, string][]>;
54+
callback?: (errors?: Error[], result?: [string, string | null][]) => void
55+
): Promise<[string, string | null][]>;
5656

5757
/**
5858
* multiSet and multiMerge take arrays of key-value array pairs that match the output of multiGet,

0 commit comments

Comments
 (0)