diff --git a/Libraries/Alert/Alert.js b/Libraries/Alert/Alert.js index c0afc6573bb..55bdce3fd40 100644 --- a/Libraries/Alert/Alert.js +++ b/Libraries/Alert/Alert.js @@ -15,7 +15,23 @@ import NativeDialogManagerAndroid, { type DialogOptions, } from '../NativeModules/specs/NativeDialogManagerAndroid'; import RCTAlertManager from './RCTAlertManager'; -import {type Buttons, type Options, type AlertType} from './NativeAlertManager'; + +export type AlertType = + | 'default' + | 'plain-text' + | 'secure-text' + | 'login-password'; +export type AlertButtonStyle = 'default' | 'cancel' | 'destructive'; +export type Buttons = Array<{ + text?: string, + onPress?: ?Function, + style?: AlertButtonStyle, +}>; + +type Options = { + cancelable?: ?boolean, + onDismiss?: ?() => void, +}; /** * Launches an alert dialog with the specified title and message. diff --git a/Libraries/Alert/NativeAlertManager.js b/Libraries/Alert/NativeAlertManager.js index 16191e7e472..1dcae0d265b 100644 --- a/Libraries/Alert/NativeAlertManager.js +++ b/Libraries/Alert/NativeAlertManager.js @@ -13,27 +13,10 @@ import type {TurboModule} from '../TurboModule/RCTExport'; import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; -export type Buttons = Array<{ - text?: string, - onPress?: ?Function, - style?: AlertButtonStyle, -}>; - -export type Options = { - cancelable?: ?boolean, - onDismiss?: ?() => void, -}; - -/* 'default' | plain-text' | 'secure-text' | 'login-password' */ -export type AlertType = string; - -/* 'default' | 'cancel' | 'destructive' */ -export type AlertButtonStyle = string; - export type Args = {| title?: string, message?: string, - buttons?: Buttons, + buttons?: Object, // TODO: have a better type type?: string, defaultValue?: string, cancelButtonKey?: string, diff --git a/Libraries/ReactNative/NativeUIManager.js b/Libraries/ReactNative/NativeUIManager.js index 9eb60e68194..ccfcd492818 100644 --- a/Libraries/ReactNative/NativeUIManager.js +++ b/Libraries/ReactNative/NativeUIManager.js @@ -30,7 +30,7 @@ export interface Spec extends TurboModule { +blur: (reactTag: ?number) => void; +findSubviewIn: ( reactTag: ?number, - point: [number, number], + point: Array, callback: ( nativeViewTag: number, left: number,