From b355ba56dbb88e8ba54114f4cbc0cb38bcaa1881 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Wed, 22 May 2019 18:19:10 -0700 Subject: [PATCH] Fix flow errors Summary: This diff fixes the flow errors that surfaced from flow-typing DialogManagerAndorid and deleting NativeDialogManagerAndroid. I also migrated all imports of NativeDialogManagerAndorid to import the module from `react-native-implementation.js`. Reviewed By: fkgozali Differential Revision: D15440162 fbshipit-source-id: 2fdfb68104bc8ffb93c0c77fe15aacadc182f62f --- .../NativeModules/specs/NativeDialogManagerAndroid.js | 8 ++++---- Libraries/react-native/react-native-implementation.js | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js b/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js index ae8c121529f..1ffb71c8ce8 100644 --- a/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js +++ b/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js @@ -23,10 +23,10 @@ type DialogAction = string; type DialogButtonKey = number; export type DialogOptions = {| title?: string, - message?: string, - buttonPositive?: string, - buttonNegative?: string, - buttonNeutral?: string, + message?: Stringish, + buttonPositive?: Stringish, + buttonNegative?: Stringish, + buttonNeutral?: Stringish, items?: Array, cancelable?: boolean, |}; diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index 8a4acfc1dfb..32142a18236 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -247,6 +247,9 @@ module.exports = { get Linking() { return require('Linking'); }, + get NativeDialogManagerAndroid() { + return require('NativeDialogManagerAndroid').default; + }, get NativeEventEmitter() { return require('NativeEventEmitter'); },