-
Notifications
You must be signed in to change notification settings - Fork 24.6k
/
Copy pathindex.js.flow
443 lines (367 loc) · 14.8 KB
/
index.js.flow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
*/
// ----------------------------------------------------------------------------
// Types entry point for react-native.
//
// Exports of this module define the public API for React Native at development
// time, and are automatically translated to TypeScript when we publish to npm.
//
// IMPORTANT: Keep this file in sync with index.js. Test your changes whenever
// updating React Native's public API.
// ----------------------------------------------------------------------------
/// <reference path="../src/types/globals.d.ts" />
// #region Components
export type {ActivityIndicatorProps} from './Libraries/Components/ActivityIndicator/ActivityIndicator';
export {default as ActivityIndicator} from './Libraries/Components/ActivityIndicator/ActivityIndicator';
export type {ButtonProps} from './Libraries/Components/Button';
export {default as Button} from './Libraries/Components/Button';
export type {
DrawerLayoutAndroidProps,
DrawerSlideEvent,
} from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
export {default as DrawerLayoutAndroid} from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
export type {FlatListProps} from './Libraries/Lists/FlatList';
export {default as FlatList} from './Libraries/Lists/FlatList';
export type {
ImageBackgroundProps,
ImageErrorEvent,
ImageLoadEvent,
ImageProgressEventIOS,
ImageProps,
ImagePropsAndroid,
ImagePropsBase,
ImagePropsIOS,
ImageResolvedAssetSource,
ImageSize,
ImageSourcePropType,
} from './Libraries/Image/Image';
export type {
ImageRequireSource,
ImageSource,
ImageURISource,
} from './Libraries/Image/ImageSource';
export {default as Image} from './Libraries/Image/Image';
export {default as ImageBackground} from './Libraries/Image/ImageBackground';
export type {InputAccessoryViewProps} from './Libraries/Components/TextInput/InputAccessoryView';
export {default as InputAccessoryView} from './Libraries/Components/TextInput/InputAccessoryView';
export type {KeyboardAvoidingViewProps} from './Libraries/Components/Keyboard/KeyboardAvoidingView';
export {default as KeyboardAvoidingView} from './Libraries/Components/Keyboard/KeyboardAvoidingView';
export type {LayoutConformanceProps} from './Libraries/Components/LayoutConformance/LayoutConformance';
export {default as experimental_LayoutConformance} from './Libraries/Components/LayoutConformance/LayoutConformance';
export type {
ModalBaseProps,
ModalProps,
ModalPropsAndroid,
ModalPropsIOS,
} from './Libraries/Modal/Modal';
export {default as Modal} from './Libraries/Modal/Modal';
export type {
PressableAndroidRippleConfig,
PressableProps,
PressableStateCallbackType,
} from './Libraries/Components/Pressable/Pressable';
export {default as Pressable} from './Libraries/Components/Pressable/Pressable';
export type {ProgressBarAndroidProps} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid';
export {default as ProgressBarAndroid} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid';
export type {
RefreshControlProps,
RefreshControlPropsAndroid,
RefreshControlPropsIOS,
} from './Libraries/Components/RefreshControl/RefreshControl';
export {default as RefreshControl} from './Libraries/Components/RefreshControl/RefreshControl';
export {default as SafeAreaView} from './Libraries/Components/SafeAreaView/SafeAreaView';
export type {
ScrollResponderType,
ScrollViewProps,
ScrollViewPropsAndroid,
ScrollViewPropsIOS,
} from './Libraries/Components/ScrollView/ScrollView';
export {default as ScrollView} from './Libraries/Components/ScrollView/ScrollView';
export type {
SectionListProps,
SectionListRenderItem,
SectionListRenderItemInfo,
} from './Libraries/Lists/SectionList';
export {default as SectionList} from './Libraries/Lists/SectionList';
export type {
StatusBarAnimation,
StatusBarProps,
StatusBarStyle,
} from './Libraries/Components/StatusBar/StatusBar';
export {default as StatusBar} from './Libraries/Components/StatusBar/StatusBar';
export type {
SwitchChangeEvent,
SwitchProps,
} from './Libraries/Components/Switch/Switch';
export {default as Switch} from './Libraries/Components/Switch/Switch';
export type {TextProps} from './Libraries/Text/Text';
export {default as Text} from './Libraries/Text/Text';
export type {
AutoCapitalize,
EnterKeyHintTypeOptions,
KeyboardTypeOptions,
InputModeOptions,
TextContentType,
TextInputAndroidProps,
TextInputIOSProps,
TextInputProps,
TextInputChangeEvent,
TextInputContentSizeChangeEvent,
TextInputEndEditingEvent,
TextInputFocusEvent,
TextInputKeyPressEvent,
TextInputSelectionChangeEvent,
TextInputSubmitEditingEvent,
ReturnKeyTypeOptions,
SubmitBehavior,
} from './Libraries/Components/TextInput/TextInput';
export {default as TextInput} from './Libraries/Components/TextInput/TextInput';
export {default as Touchable} from './Libraries/Components/Touchable/Touchable';
export type {TouchableHighlightProps} from './Libraries/Components/Touchable/TouchableHighlight';
export {default as TouchableHighlight} from './Libraries/Components/Touchable/TouchableHighlight';
export type {TouchableNativeFeedbackProps} from './Libraries/Components/Touchable/TouchableNativeFeedback';
export {default as TouchableNativeFeedback} from './Libraries/Components/Touchable/TouchableNativeFeedback';
export type {TouchableOpacityProps} from './Libraries/Components/Touchable/TouchableOpacity';
export {default as TouchableOpacity} from './Libraries/Components/Touchable/TouchableOpacity';
export type {TouchableWithoutFeedbackProps} from './Libraries/Components/Touchable/TouchableWithoutFeedback';
export {default as TouchableWithoutFeedback} from './Libraries/Components/Touchable/TouchableWithoutFeedback';
export type {
AccessibilityActionEvent,
AccessibilityProps,
AccessibilityRole,
AccessibilityState,
AccessibilityValue,
Role,
} from './Libraries/Components/View/ViewAccessibility';
export type {
GestureResponderHandlers,
TVViewPropsIOS,
ViewProps,
ViewPropsAndroid,
ViewPropsIOS,
} from './Libraries/Components/View/ViewPropTypes';
export {default as View} from './Libraries/Components/View/View';
export type {
ListRenderItemInfo,
ListRenderItem,
Separators,
VirtualizedListProps,
} from './Libraries/Lists/VirtualizedList';
export {default as VirtualizedList} from './Libraries/Lists/VirtualizedList';
export type {
ScrollToLocationParamsType,
SectionBase,
VirtualizedSectionListProps,
} from './Libraries/Lists/VirtualizedSectionList';
export {default as VirtualizedSectionList} from './Libraries/Lists/VirtualizedSectionList';
// #endregion
// #region APIs
export {default as AccessibilityInfo} from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
export type {
ActionSheetIOSOptions,
ShareActionSheetIOSOptions,
ShareActionSheetError,
} from './Libraries/ActionSheetIOS/ActionSheetIOS';
export {default as ActionSheetIOS} from './Libraries/ActionSheetIOS/ActionSheetIOS';
export type {
AlertType,
AlertButtonStyle,
AlertButton,
AlertOptions,
} from './Libraries/Alert/Alert';
export {default as Alert} from './Libraries/Alert/Alert';
export {default as Animated} from './Libraries/Animated/Animated';
export * as Appearance from './Libraries/Utilities/Appearance';
export type {
TaskProvider,
ComponentProvider,
ComponentProviderInstrumentationHook,
AppConfig,
Runnable,
Runnables,
Registry,
WrapperComponentProvider,
RootViewStyleProvider,
} from './Libraries/ReactNative/AppRegistry';
export {AppRegistry} from './Libraries/ReactNative/AppRegistry';
export type {
AppStateStatus,
AppStateEvent,
} from './Libraries/AppState/AppState';
export {default as AppState} from './Libraries/AppState/AppState';
export type {BackPressEventName} from './Libraries/Utilities/BackHandler';
export {default as BackHandler} from './Libraries/Utilities/BackHandler';
export {default as Clipboard} from './Libraries/Components/Clipboard/Clipboard';
export {default as codegenNativeComponent} from './Libraries/Utilities/codegenNativeComponent';
export {default as codegenNativeCommands} from './Libraries/Utilities/codegenNativeCommands';
export {default as DeviceEventEmitter} from './Libraries/EventEmitter/RCTDeviceEventEmitter';
export type {DeviceInfoConstants} from './Libraries/Utilities/DeviceInfo';
export {default as DeviceInfo} from './Libraries/Utilities/DeviceInfo';
export {default as DevMenu} from './src/private/devsupport/devmenu/DevMenu';
export {default as DevSettings} from './Libraries/Utilities/DevSettings';
export type {
DimensionsPayload,
DisplayMetrics,
DisplayMetricsAndroid,
ScaledSize,
} from './Libraries/Utilities/Dimensions';
export {default as Dimensions} from './Libraries/Utilities/Dimensions';
export type {DynamicColorIOSTuple} from './Libraries/StyleSheet/PlatformColorValueTypesIOS';
export {DynamicColorIOS} from './Libraries/StyleSheet/PlatformColorValueTypesIOS';
export type {EasingFunction} from './Libraries/Animated/Easing';
export {default as Easing} from './Libraries/Animated/Easing';
export {findNodeHandle} from './Libraries/ReactNative/RendererProxy';
export {default as I18nManager} from './Libraries/ReactNative/I18nManager';
export type {
Handle,
PromiseTask,
SimpleTask,
} from './Libraries/Interaction/InteractionManager';
export {default as InteractionManager} from './Libraries/Interaction/InteractionManager';
export type {
AndroidKeyboardEvent,
IOSKeyboardEvent,
KeyboardEvent,
KeyboardEventEasing,
KeyboardEventName,
KeyboardMetrics,
} from './Libraries/Components/Keyboard/Keyboard';
export {default as Keyboard} from './Libraries/Components/Keyboard/Keyboard';
export type {
LayoutAnimationAnim,
LayoutAnimationConfig,
LayoutAnimationProperties,
LayoutAnimationProperty,
LayoutAnimationType,
LayoutAnimationTypes,
} from './Libraries/LayoutAnimation/LayoutAnimation';
export {default as LayoutAnimation} from './Libraries/LayoutAnimation/LayoutAnimation';
export {default as Linking} from './Libraries/Linking/Linking';
export type {
ExtendedExceptionData,
IgnorePattern,
LogData,
} from './Libraries/LogBox/LogBox';
export {default as LogBox} from './Libraries/LogBox/LogBox';
export {default as NativeAppEventEmitter} from './Libraries/EventEmitter/RCTNativeAppEventEmitter';
export {default as NativeDialogManagerAndroid} from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
export type {
EventSubscription,
EmitterSubscription,
NativeEventSubscription,
} from './Libraries/EventEmitter/NativeEventEmitter';
export {default as NativeEventEmitter} from './Libraries/EventEmitter/NativeEventEmitter';
export {default as NativeModules} from './Libraries/BatchedBridge/NativeModules';
export {default as Networking} from './Libraries/Network/RCTNetworking';
export * as NewAppScreen from './Libraries/NewAppScreen';
export type {
PanResponderCallbacks,
PanResponderGestureState,
PanResponderInstance,
} from './Libraries/Interaction/PanResponder';
export {default as PanResponder} from './Libraries/Interaction/PanResponder';
export type {
Permission,
PermissionStatus,
Rationale,
} from './Libraries/PermissionsAndroid/PermissionsAndroid';
export {default as PermissionsAndroid} from './Libraries/PermissionsAndroid/PermissionsAndroid';
export {default as PixelRatio} from './Libraries/Utilities/PixelRatio';
export type {
PlatformOSType,
PlatformSelectSpec,
} from './Libraries/Utilities/PlatformTypes';
export {default as Platform} from './Libraries/Utilities/Platform';
export {PlatformColor} from './Libraries/StyleSheet/PlatformColorValueTypes';
export type {
PushNotificationEventName,
PushNotificationPermissions,
} from './Libraries/PushNotificationIOS/PushNotificationIOS';
export {default as PushNotificationIOS} from './Libraries/PushNotificationIOS/PushNotificationIOS';
export type {ProcessedColorValue} from './Libraries/StyleSheet/processColor';
export {default as processColor} from './Libraries/StyleSheet/processColor';
export {default as registerCallableModule} from './Libraries/Core/registerCallableModule';
export {default as requireNativeComponent} from './Libraries/ReactNative/requireNativeComponent';
export type {RootTag} from './Libraries/ReactNative/RootTag';
export {RootTagContext} from './Libraries/ReactNative/RootTag';
export {default as Settings} from './Libraries/Settings/Settings';
export type {
ShareAction,
ShareContent,
ShareOptions,
} from './Libraries/Share/Share';
export {default as Share} from './Libraries/Share/Share';
// TODO(T210505449): StyleSheet/StyleSheetTypes exports are incomplete - review
export type {
ColorValue,
ImageStyle,
FilterFunction,
FontVariant,
NativeColorValue,
OpaqueColorValue,
StyleProp,
TextStyle,
TransformsStyle,
ViewStyle,
} from './Libraries/StyleSheet/StyleSheet';
export type {
BoxShadowValue,
CursorValue,
DimensionValue,
DropShadowValue,
EdgeInsetsValue,
PointValue,
} from './Libraries/StyleSheet/StyleSheetTypes';
export type {Insets} from './Libraries/StyleSheet/Rect';
export {default as StyleSheet} from './Libraries/StyleSheet/StyleSheet';
export * as Systrace from './Libraries/Performance/Systrace';
export {default as ToastAndroid} from './Libraries/Components/ToastAndroid/ToastAndroid';
export * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistry';
export {default as UIManager} from './Libraries/ReactNative/UIManager';
export {unstable_batchedUpdates} from './Libraries/ReactNative/RendererProxy';
export {default as useAnimatedValue} from './Libraries/Animated/useAnimatedValue';
export {default as useColorScheme} from './Libraries/Utilities/useColorScheme';
export {default as useWindowDimensions} from './Libraries/Utilities/useWindowDimensions';
export {default as UTFSequence} from './Libraries/UTFSequence';
export {default as Vibration} from './Libraries/Vibration/Vibration';
// #endregion
// #region APIs (types only)
export type {
BlurEvent,
FocusEvent,
GestureResponderEvent,
LayoutChangeEvent,
LayoutRectangle,
MouseEvent,
NativeMouseEvent,
NativePointerEvent,
NativeScrollEvent,
NativeSyntheticEvent,
NativeTouchEvent,
NativeUIEvent,
ResponderSyntheticEvent,
ScrollEvent,
TargetedEvent,
TextLayoutEvent,
} from './Libraries/Types/CoreEventTypes';
export type {TurboModule} from './Libraries/TurboModule/RCTExport';
export type * from './Libraries/Types/CodegenTypesNamespace';
export type {
HostInstance,
NativeMethods,
NativeMethodsMixin,
MeasureInWindowOnSuccessCallback,
MeasureLayoutOnSuccessCallback,
MeasureOnSuccessCallback,
} from './src/private/types/HostInstance';
export type {HostComponent} from './src/private/types/HostComponent';
export type {ColorSchemeName} from './src/private/specs_DEPRECATED/modules/NativeAppearance';
export type {ErrorUtils} from './Libraries/vendor/core/ErrorUtils';
// #endregion