Skip to content

Commit

Permalink
fix: add proper Promise flow definition for AccessibilityInfo.android.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Estevão Lucas committed Mar 11, 2019
1 parent 3c44bf0 commit 2294a73
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,13 @@ const _subscriptions = new Map();
*/

const AccessibilityInfo = {
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found
* when making Flow check .android.js files. */
isReduceMotionEnabled: function(): Promise {
isReduceMotionEnabled: function(): Promise<boolean> {
return new Promise((resolve, reject) => {
RCTAccessibilityInfo.isReduceMotionEnabled(resolve);
});
},

/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found
* when making Flow check .android.js files. */
isScreenReaderEnabled: function(): Promise {
isScreenReaderEnabled: function(): Promise<boolean> {
return new Promise((resolve, reject) => {
RCTAccessibilityInfo.isTouchExplorationEnabled(resolve);
});
Expand Down

0 comments on commit 2294a73

Please sign in to comment.