Closed
Description
Current behavior
Querying AsyncStorage for an unknown key using multiGet can return null values.
However the types indicate this is impossible.
Expected behavior
Types should indicate that returning null is possible, OR null should never be returned (I don't know which is correct, but I would think the types).
Repro steps
Run code:
const [testPair] = await AsyncStorage.multiGet(["DOES NOT EXIST"]);
console.log(testPair);
return value: ["DOES NOT EXIST", null]
Environment
- Async Storage version: Latest
"@react-native-community/async-storage": "^1.2.2",
"react-native": "0.59.1",
- Platform tested: iOS