Commit Graph

7 Commits

Author SHA1 Message Date
Emily Eisenberg 30a479db8b Make AsyncStorage types match the implementations
Summary:
The `getAllKeys` callback type was completely missing the return value, and all of the callbacks are optional. This just fixes the types to match what the implementations are doing.
Closes https://github.com/facebook/react-native/pull/1079
Github Author: Emily Eisenberg <xymostech@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-01 18:26:11 -08:00
Rob McVey 2aa52880b7 Add promise support to AsyncStorage
Summary:
Since `AsyncStorage` is the primary cache, it would be nice to stick with fetch's promise model and make the common use-case of:
1) check cache
2) make request if cache is invalid
more straightforward. Currently if I want to check a cache prior to using fetch (or another promise-based XHR lib) I have to provide a callback. I left the callback support and `resolve`/`reject` the promise after the callback has been applied.
Closes https://github.com/facebook/react-native/pull/593
Github Author: Rob McVey <mcvey@thecollective-la.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-07 01:45:26 -08:00
Christopher Chedeau e1ef0328d9 [ReactNative] Expanded license on js files 2015-03-23 13:17:54 -08:00
Spencer Ahrens 9086365faf [ReactNative] Strip prefixes from NativeModules keys 2015-03-17 21:54:27 -08:00
Spencer Ahrens 54c6a7ddff [ReactNative] Allow single callbacks in NativeModules 2015-03-17 02:48:57 -08:00
Spencer Ahrens b396de3cc8 [ReactNative] s/RK/RCT in OSS 2015-03-17 02:48:57 -08:00
Spencer Ahrens 221ddd3cfe [ReactNative] OSS AsyncStorage with example 2015-03-11 11:54:09 -08:00