Re-land "[RN] TM: attempt to integrate with internal codegen infra""

Summary: This is a re-land of https://github.com/facebook/react-native/commit/66e02588850ee81aa8574edc46c954e7bccf42e7 after fixing internal build failures.

Reviewed By: mdvacca

Differential Revision: D15764832

fbshipit-source-id: f4fb347a9c6c02fb146b24ba395436bd31a37deb
This commit is contained in:
Kevin Gozali
2019-06-11 17:11:58 -07:00
committed by Facebook Github Bot
parent dec9698d1c
commit 0a66ded7d0
3 changed files with 19 additions and 20 deletions
+17 -1
View File
@@ -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.
+1 -18
View File
@@ -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,
+1 -1
View File
@@ -30,7 +30,7 @@ export interface Spec extends TurboModule {
+blur: (reactTag: ?number) => void;
+findSubviewIn: (
reactTag: ?number,
point: [number, number],
point: Array<number>,
callback: (
nativeViewTag: number,
left: number,