Closed
Description
What happened?
At current, (readonly [string, string])[]
is going to be rejected by multiSet
because its function signature is the following:
(keyValuePairs: [string, string][], callback?: MultiCallback) => Promise<void>
It should be the following:
(keyValuePairs: ReadonlyArray<readonly [string, string]>, callback?: MultiCallback) => Promise<void>
Version
1.23.1
What platforms are you seeing this issue on?
- Android
- iOS
- macOS
- Windows
- web
System Information
Irrelevant
Steps to Reproduce
const entries = [['key', 'val']].map(([k, v]) => [k, v] as const)
AsyncStorage.multiSet(entries);
// ~~~~~~~
// Argument of type '(readonly [string, string])[]' is not assignable to parameter of type '[string, string][]'.
// The type 'readonly [string, string]' is 'readonly' and cannot be assigned to the mutable type '[string, string]'