File tree 2 files changed +12
-9
lines changed
2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const NativeModules = require('NativeModules');
16
16
const Platform = require ( 'Platform' ) ;
17
17
18
18
import type { AlertType , AlertButtonStyle } from 'AlertIOS' ;
19
+ import type { Fbt } from 'fbt' ;
19
20
20
21
export type Buttons = Array < {
21
22
text ?: string ,
@@ -79,8 +80,8 @@ type Options = {
79
80
class Alert {
80
81
81
82
static alert (
82
- title : ?string ,
83
- message ?: ?string ,
83
+ title : ?string | ? Fbt ,
84
+ message ?: ?string | ? Fbt ,
84
85
buttons ?: Buttons ,
85
86
options ?: Options ,
86
87
type ?: AlertType ,
@@ -104,8 +105,8 @@ class Alert {
104
105
class AlertAndroid {
105
106
106
107
static alert (
107
- title : ?string ,
108
- message ?: ?string ,
108
+ title : ?string | ? Fbt ,
109
+ message ?: ?string | ? Fbt ,
109
110
buttons ?: Buttons ,
110
111
options ?: Options ,
111
112
) : void {
Original file line number Diff line number Diff line change 12
12
*/
13
13
'use strict' ;
14
14
15
- var RCTAlertManager = require ( 'NativeModules' ) . AlertManager ;
15
+ const RCTAlertManager = require ( 'NativeModules' ) . AlertManager ;
16
+
17
+ import type { Fbt } from 'fbt' ;
16
18
17
19
/**
18
20
* An Alert button type
@@ -133,8 +135,8 @@ class AlertIOS {
133
135
* );
134
136
*/
135
137
static alert (
136
- title : ?string ,
137
- message ?: ?string ,
138
+ title : ?string | ? Fbt ,
139
+ message ?: ?string | ? Fbt ,
138
140
callbackOrButtons ?: ?( ( ) => void ) | ButtonsArray ,
139
141
type ?: AlertType ,
140
142
) : void {
@@ -192,8 +194,8 @@ class AlertIOS {
192
194
* );
193
195
*/
194
196
static prompt (
195
- title : ?string ,
196
- message ?: ?string ,
197
+ title : ?string | ? Fbt ,
198
+ message ?: ?string | ? Fbt ,
197
199
callbackOrButtons ?: ?( ( text : string ) => void ) | ButtonsArray ,
198
200
type ?: ?AlertType = 'plain-text' ,
199
201
defaultValue ?: string ,
You can’t perform that action at this time.
0 commit comments