Merge pull request #28052 from morishin/fix-react-native-async-storage-get-item-return-type

Fix return type React Native AsyncStorage.getItem
This commit is contained in:
Eloy Durán
2018-08-13 13:25:03 +02:00
committed by GitHub
+1 -1
View File
@@ -6847,7 +6847,7 @@ export interface AsyncStorageStatic {
/**
* Fetches key and passes the result to callback, along with an Error if there is any.
*/
getItem(key: string, callback?: (error?: Error, result?: string) => void): Promise<string>;
getItem(key: string, callback?: (error?: Error, result?: string) => void): Promise<string | null>;
/**
* Sets value for key and calls callback on completion, along with an Error if there is any