react-native-windows 0.83.0-preview.2 → 0.84.0-preview.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.flowconfig +2 -2
- package/Folly/Folly.vcxproj +2 -0
- package/Libraries/Animated/AnimatedEvent.js +2 -2
- package/Libraries/Animated/animations/Animation.js +1 -3
- package/Libraries/Animated/createAnimatedComponent.js +8 -5
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +40 -4
- package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
- package/Libraries/Animated/nodes/AnimatedObject.js +16 -11
- package/Libraries/Animated/nodes/AnimatedProps.js +43 -12
- package/Libraries/Animated/nodes/AnimatedStyle.js +12 -12
- package/Libraries/Animated/nodes/AnimatedValue.js +6 -3
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/BatchedBridge/MessageQueue.js +24 -22
- package/Libraries/Blob/URL.js +34 -3
- package/Libraries/Blob/URLSearchParams.js +1 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +9 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +6 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +6 -1
- package/Libraries/Components/Button.js +2 -5
- package/Libraries/Components/Button.windows.js +2 -5
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +4 -4
- package/Libraries/Components/Keyboard/Keyboard.js +2 -2
- package/Libraries/Components/Pressable/Pressable.js +8 -8
- package/Libraries/Components/Pressable/Pressable.windows.js +14 -13
- package/Libraries/Components/TextInput/TextInput.flow.js +13 -13
- package/Libraries/Components/TextInput/TextInput.flow.windows.js +19 -18
- package/Libraries/Components/TextInput/TextInput.js +33 -34
- package/Libraries/Components/TextInput/TextInput.windows.js +40 -39
- package/Libraries/Components/Touchable/PooledClass.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +3 -3
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +3 -3
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +9 -9
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +9 -9
- package/Libraries/Components/View/ViewPropTypes.js +16 -6
- package/Libraries/Components/View/ViewPropTypes.windows.js +21 -11
- package/Libraries/Core/Devtools/loadBundleFromServer.js +6 -3
- package/Libraries/Core/Devtools/loadBundleFromServer.windows.js +6 -3
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +1 -1
- package/Libraries/Core/ExceptionsManager.js +3 -3
- package/Libraries/Core/RawEventEmitter.js +1 -1
- package/Libraries/Core/ReactFiberErrorDialog.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +2 -2
- package/Libraries/Image/Image.android.js +2 -2
- package/Libraries/Image/Image.ios.js +2 -2
- package/Libraries/Image/Image.windows.js +2 -2
- package/Libraries/Image/ImageProps.js +1 -1
- package/Libraries/Image/ImageTypes.flow.js +2 -2
- package/Libraries/Interaction/InteractionManager.js +3 -3
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +31 -4
- package/Libraries/LogBox/Data/LogBoxLog.js +2 -2
- package/Libraries/LogBox/Data/LogBoxSymbolication.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +5 -5
- package/Libraries/LogBox/LogBox.js +7 -7
- package/Libraries/NativeComponent/BaseViewConfig.android.js +12 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +4 -4
- package/Libraries/NativeComponent/ViewConfigIgnore.js +1 -1
- package/Libraries/NativeComponent/ViewConfigIgnore.windows.js +1 -1
- package/Libraries/Network/RCTNetworking.android.js +3 -3
- package/Libraries/Network/RCTNetworking.ios.js +2 -2
- package/Libraries/Network/RCTNetworking.js.flow +2 -2
- package/Libraries/Network/RCTNetworking.windows.js +2 -2
- package/Libraries/Pressability/Pressability.js +9 -9
- package/Libraries/Pressability/Pressability.windows.js +17 -16
- package/Libraries/ReactNative/AppRegistry.flow.js +1 -1
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -1
- package/Libraries/ReactNative/FabricUIManager.js +1 -1
- package/Libraries/ReactNative/PaperUIManager.js +1 -1
- package/Libraries/ReactNative/PaperUIManager.windows.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js +2 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +1 -1
- package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +11 -4
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +11 -4
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +11 -4
- package/Libraries/Renderer/shims/ReactFabric.js +3 -1
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
- package/Libraries/Renderer/shims/ReactNative.js +2 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.windows.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
- package/Libraries/Settings/Settings.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.js.flow +4 -2
- package/Libraries/StyleSheet/StyleSheetExports.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +99 -4
- package/Libraries/StyleSheet/StyleSheetTypes.js +6 -8
- package/Libraries/StyleSheet/processFilter.js +1 -1
- package/Libraries/Text/Text.js +46 -6
- package/Libraries/Text/Text.windows.js +46 -6
- package/Libraries/Text/TextNativeComponent.js +1 -1
- package/Libraries/Text/TextProps.js +7 -7
- package/Libraries/Text/TextProps.windows.js +7 -7
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.js +31 -0
- package/Libraries/Types/CoreEventTypes.windows.js +31 -13
- package/Libraries/Types/ReactDevToolsTypes.js +2 -2
- package/Libraries/Utilities/Appearance.js +2 -2
- package/Libraries/Utilities/DevLoadingView.js +8 -1
- package/Libraries/Utilities/DevSettings.js +3 -3
- package/Libraries/Utilities/HMRClient.js +4 -3
- package/Libraries/Utilities/RCTLog.js +3 -3
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +1 -1
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +3 -3
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +7 -7
- package/Libraries/Utilities/useRefEffect.js +1 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +3 -3
- package/Libraries/promiseRejectionTrackingOptions.js +8 -8
- package/Libraries/vendor/core/ErrorUtils.js +10 -10
- package/Libraries/vendor/emitter/EventEmitter.js +6 -6
- package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +5 -0
- package/Microsoft.ReactNative/Fabric/AbiViewProps.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +25 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +9 -3
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +2 -3
- package/Microsoft.ReactNative/Fabric/ReactTaggedView.h +2 -2
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +2 -0
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +6 -0
- package/Microsoft.ReactNative/ViewProps.idl +9 -0
- package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.h +12 -2
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/ReactCommon/ReactCommon.vcxproj +7 -1
- package/ReactCommon/ReactCommon.vcxproj.filters +0 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +5 -5
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +0 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSIExecutor.cpp +2 -43
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +12 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/attributedstring/TextAttributes.cpp +291 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventDispatcher.cpp +0 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventQueueProcessor.cpp +1 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/propsConversions.h +199 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp +6 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +17 -10
- package/Scripts/creaternwapp.cmd +8 -1
- package/Scripts/creaternwlib.cmd +21 -2
- package/Shared/DevSettings.h +0 -3
- package/Shared/Modules/WebSocketModule.cpp +0 -1
- package/Shared/Modules/WebSocketModule.h +62 -3
- package/Shared/OInstance.cpp +5 -0
- package/Shared/Shared.vcxitems +4 -6
- package/Shared/Shared.vcxitems.filters +218 -709
- package/codegen/NativeAccessibilityManagerSpec.g.h +2 -0
- package/codegen/NativeAnimatedModuleSpec.g.h +21 -15
- package/codegen/NativeDevLoadingViewSpec.g.h +3 -3
- package/codegen/NativeIntentAndroidSpec.g.h +16 -3
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +209 -191
- package/codegen/react/components/rnwcore/EventEmitters.h +1 -0
- package/codegen/react/components/rnwcore/Props.h +14 -0
- package/codegen/rnwcoreJSI.h +246 -211
- package/index.js +3 -0
- package/index.windows.js +3 -0
- package/jest/mock.js +2 -2
- package/jest/mockComponent.js +1 -1
- package/jest/setup.js +1 -1
- package/package.json +22 -21
- package/src/private/animated/NativeAnimatedHelper.js +130 -125
- package/src/private/animated/NativeAnimatedValidation.js +7 -4
- package/src/private/animated/createAnimatedPropsHook.js +13 -5
- package/src/private/animated/createAnimatedPropsMemoHook.js +10 -10
- package/src/private/components/virtualview/VirtualView.js +16 -9
- package/src/private/components/virtualview/logger/VirtualViewLogger.js +21 -0
- package/src/private/components/virtualview/logger/VirtualViewLoggerTypes.js +24 -0
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +6 -25
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +1 -27
- package/src/private/devsupport/devmenu/elementinspector/XHRInterceptor.js +3 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +63 -42
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +3 -3
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +12 -9
- package/src/private/renderer/errorhandling/ErrorHandlers.js +7 -4
- package/src/private/specs_DEPRECATED/modules/NativeAccessibilityManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +4 -0
- package/src/private/specs_DEPRECATED/modules/NativeDevLoadingView.js +1 -0
- package/src/private/webapis/dom/events/CustomEvent.js +3 -3
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +29 -29
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +1 -1
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/geometry/DOMRectReadOnly.js +1 -1
- package/src/private/webapis/html/events/MessageEvent.js +3 -3
- package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +3 -3
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +53 -5
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +2 -2
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +4 -4
- package/src/private/webapis/microtasks/specs/NativeMicrotasks.js +1 -1
- package/src/private/webapis/mutationobserver/MutationObserver.js +1 -1
- package/src/private/webapis/mutationobserver/MutationRecord.js +1 -1
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +4 -4
- package/src/private/webapis/performance/Performance.js +1 -1
- package/src/private/webapis/performance/UserTiming.js +1 -1
- package/src/private/webapis/performance/specs/NativePerformance.js +3 -3
- package/src/private/webapis/structuredClone/structuredClone.js +3 -3
- package/src/types/globals.d.ts +30 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/image/conversions.h +0 -178
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/primitives.h +0 -183
- package/Shared/Modules/WebSocketTurboModule.h +0 -71
- package/src/private/devsupport/devmenu/elementinspector/NetworkOverlay.js +0 -628
- package/src/private/devsupport/devmenu/perfmonitor/PerformanceOverlay.js +0 -66
|
@@ -390,7 +390,7 @@ class TouchableNativeFeedback extends React.Component<
|
|
|
390
390
|
this.state.pressability.configure(this._createPressabilityConfig());
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
-
componentDidMount():
|
|
393
|
+
componentDidMount(): unknown {
|
|
394
394
|
this.state.pressability.configure(this._createPressabilityConfig());
|
|
395
395
|
}
|
|
396
396
|
|
|
@@ -397,7 +397,7 @@ class TouchableNativeFeedback extends React.Component<
|
|
|
397
397
|
this.state.pressability.configure(this._createPressabilityConfig());
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
componentDidMount():
|
|
400
|
+
componentDidMount(): unknown {
|
|
401
401
|
this.state.pressability.configure(this._createPressabilityConfig());
|
|
402
402
|
}
|
|
403
403
|
|
|
@@ -79,32 +79,32 @@ export type TouchableWithoutFeedbackProps = $ReadOnly<
|
|
|
79
79
|
| 'no-hide-descendants'
|
|
80
80
|
),
|
|
81
81
|
nativeID?: ?string,
|
|
82
|
-
onAccessibilityAction?: ?(event: AccessibilityActionEvent) =>
|
|
82
|
+
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => unknown,
|
|
83
83
|
/**
|
|
84
84
|
* When `accessible` is true (which is the default) this may be called when
|
|
85
85
|
* the OS-specific concept of "blur" occurs, meaning the element lost focus.
|
|
86
86
|
* Some platforms may not have the concept of blur.
|
|
87
87
|
*/
|
|
88
|
-
onBlur?: ?(event: BlurEvent) =>
|
|
88
|
+
onBlur?: ?(event: BlurEvent) => unknown,
|
|
89
89
|
/**
|
|
90
90
|
* When `accessible` is true (which is the default) this may be called when
|
|
91
91
|
* the OS-specific concept of "focus" occurs. Some platforms may not have
|
|
92
92
|
* the concept of focus.
|
|
93
93
|
*/
|
|
94
|
-
onFocus?: ?(event: FocusEvent) =>
|
|
94
|
+
onFocus?: ?(event: FocusEvent) => unknown,
|
|
95
95
|
/**
|
|
96
96
|
* Invoked on mount and layout changes with
|
|
97
97
|
* {nativeEvent: {layout: {x, y, width, height}}}
|
|
98
98
|
*/
|
|
99
|
-
onLayout?: ?(event: LayoutChangeEvent) =>
|
|
100
|
-
onLongPress?: ?(event: GestureResponderEvent) =>
|
|
99
|
+
onLayout?: ?(event: LayoutChangeEvent) => unknown,
|
|
100
|
+
onLongPress?: ?(event: GestureResponderEvent) => unknown,
|
|
101
101
|
/**
|
|
102
102
|
* Called when the touch is released,
|
|
103
103
|
* but not if cancelled (e.g. by a scroll that steals the responder lock).
|
|
104
104
|
*/
|
|
105
|
-
onPress?: ?(event: GestureResponderEvent) =>
|
|
106
|
-
onPressIn?: ?(event: GestureResponderEvent) =>
|
|
107
|
-
onPressOut?: ?(event: GestureResponderEvent) =>
|
|
105
|
+
onPress?: ?(event: GestureResponderEvent) => unknown,
|
|
106
|
+
onPressIn?: ?(event: GestureResponderEvent) => unknown,
|
|
107
|
+
onPressOut?: ?(event: GestureResponderEvent) => unknown,
|
|
108
108
|
/**
|
|
109
109
|
* When the scroll view is disabled, this defines how far your
|
|
110
110
|
* touch may move off of the button, before deactivating the button.
|
|
@@ -250,7 +250,7 @@ export default function TouchableWithoutFeedback(
|
|
|
250
250
|
// adopting `Pressability`, so preserve that behavior.
|
|
251
251
|
const {onBlur, onFocus, ...eventHandlersWithoutBlurAndFocus} = eventHandlers;
|
|
252
252
|
|
|
253
|
-
const elementProps: {[string]:
|
|
253
|
+
const elementProps: {[string]: unknown, ...} = {
|
|
254
254
|
...eventHandlersWithoutBlurAndFocus,
|
|
255
255
|
accessible: props.accessible !== false,
|
|
256
256
|
accessibilityState:
|
|
@@ -94,32 +94,32 @@ export type TouchableWithoutFeedbackProps = $ReadOnly<
|
|
|
94
94
|
| 'no-hide-descendants'
|
|
95
95
|
),
|
|
96
96
|
nativeID?: ?string,
|
|
97
|
-
onAccessibilityAction?: ?(event: AccessibilityActionEvent) =>
|
|
97
|
+
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => unknown,
|
|
98
98
|
/**
|
|
99
99
|
* When `accessible` is true (which is the default) this may be called when
|
|
100
100
|
* the OS-specific concept of "blur" occurs, meaning the element lost focus.
|
|
101
101
|
* Some platforms may not have the concept of blur.
|
|
102
102
|
*/
|
|
103
|
-
onBlur?: ?(event: BlurEvent) =>
|
|
103
|
+
onBlur?: ?(event: BlurEvent) => unknown,
|
|
104
104
|
/**
|
|
105
105
|
* When `accessible` is true (which is the default) this may be called when
|
|
106
106
|
* the OS-specific concept of "focus" occurs. Some platforms may not have
|
|
107
107
|
* the concept of focus.
|
|
108
108
|
*/
|
|
109
|
-
onFocus?: ?(event: FocusEvent) =>
|
|
109
|
+
onFocus?: ?(event: FocusEvent) => unknown,
|
|
110
110
|
/**
|
|
111
111
|
* Invoked on mount and layout changes with
|
|
112
112
|
* {nativeEvent: {layout: {x, y, width, height}}}
|
|
113
113
|
*/
|
|
114
|
-
onLayout?: ?(event: LayoutChangeEvent) =>
|
|
115
|
-
onLongPress?: ?(event: GestureResponderEvent) =>
|
|
114
|
+
onLayout?: ?(event: LayoutChangeEvent) => unknown,
|
|
115
|
+
onLongPress?: ?(event: GestureResponderEvent) => unknown,
|
|
116
116
|
/**
|
|
117
117
|
* Called when the touch is released,
|
|
118
118
|
* but not if cancelled (e.g. by a scroll that steals the responder lock).
|
|
119
119
|
*/
|
|
120
|
-
onPress?: ?(event: GestureResponderEvent) =>
|
|
121
|
-
onPressIn?: ?(event: GestureResponderEvent) =>
|
|
122
|
-
onPressOut?: ?(event: GestureResponderEvent) =>
|
|
120
|
+
onPress?: ?(event: GestureResponderEvent) => unknown,
|
|
121
|
+
onPressIn?: ?(event: GestureResponderEvent) => unknown,
|
|
122
|
+
onPressOut?: ?(event: GestureResponderEvent) => unknown,
|
|
123
123
|
/**
|
|
124
124
|
* When the scroll view is disabled, this defines how far your
|
|
125
125
|
* touch may move off of the button, before deactivating the button.
|
|
@@ -290,7 +290,7 @@ const TouchableWithoutFeedback: React.AbstractComponent<
|
|
|
290
290
|
// adopting `Pressability`, so preserve that behavior.
|
|
291
291
|
const {onBlur, onFocus, ...eventHandlersWithoutBlurAndFocus} = eventHandlers;
|
|
292
292
|
|
|
293
|
-
const elementProps: {[string]:
|
|
293
|
+
const elementProps: {[string]: unknown, ...} = {
|
|
294
294
|
...eventHandlersWithoutBlurAndFocus,
|
|
295
295
|
accessible: props.accessible !== false,
|
|
296
296
|
accessibilityState:
|
|
@@ -16,6 +16,8 @@ import type {
|
|
|
16
16
|
BlurEvent,
|
|
17
17
|
FocusEvent,
|
|
18
18
|
GestureResponderEvent,
|
|
19
|
+
KeyDownEvent,
|
|
20
|
+
KeyUpEvent,
|
|
19
21
|
LayoutChangeEvent,
|
|
20
22
|
LayoutRectangle,
|
|
21
23
|
MouseEvent,
|
|
@@ -37,7 +39,7 @@ type DirectEventProps = $ReadOnly<{
|
|
|
37
39
|
* when the user performs an accessibility custom action.
|
|
38
40
|
*
|
|
39
41
|
*/
|
|
40
|
-
onAccessibilityAction?: ?(event: AccessibilityActionEvent) =>
|
|
42
|
+
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => unknown,
|
|
41
43
|
|
|
42
44
|
/**
|
|
43
45
|
* When `accessible` is true, the system will try to invoke this function
|
|
@@ -45,7 +47,7 @@ type DirectEventProps = $ReadOnly<{
|
|
|
45
47
|
*
|
|
46
48
|
* See https://reactnative.dev/docs/view#onaccessibilitytap
|
|
47
49
|
*/
|
|
48
|
-
onAccessibilityTap?: ?() =>
|
|
50
|
+
onAccessibilityTap?: ?() => unknown,
|
|
49
51
|
|
|
50
52
|
/**
|
|
51
53
|
* Invoked on mount and layout changes with:
|
|
@@ -58,7 +60,7 @@ type DirectEventProps = $ReadOnly<{
|
|
|
58
60
|
*
|
|
59
61
|
* See https://reactnative.dev/docs/view#onlayout
|
|
60
62
|
*/
|
|
61
|
-
onLayout?: ?(event: LayoutChangeEvent) =>
|
|
63
|
+
onLayout?: ?(event: LayoutChangeEvent) => unknown,
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
66
|
* When `accessible` is `true`, the system will invoke this function when the
|
|
@@ -66,7 +68,7 @@ type DirectEventProps = $ReadOnly<{
|
|
|
66
68
|
*
|
|
67
69
|
* See https://reactnative.dev/docs/view#onmagictap
|
|
68
70
|
*/
|
|
69
|
-
onMagicTap?: ?() =>
|
|
71
|
+
onMagicTap?: ?() => unknown,
|
|
70
72
|
|
|
71
73
|
/**
|
|
72
74
|
* When `accessible` is `true`, the system will invoke this function when the
|
|
@@ -74,7 +76,7 @@ type DirectEventProps = $ReadOnly<{
|
|
|
74
76
|
*
|
|
75
77
|
* See https://reactnative.dev/docs/view#onaccessibilityescape
|
|
76
78
|
*/
|
|
77
|
-
onAccessibilityEscape?: ?() =>
|
|
79
|
+
onAccessibilityEscape?: ?() => unknown,
|
|
78
80
|
}>;
|
|
79
81
|
|
|
80
82
|
type MouseEventProps = $ReadOnly<{
|
|
@@ -115,6 +117,13 @@ type FocusEventProps = $ReadOnly<{
|
|
|
115
117
|
onFocusCapture?: ?(event: FocusEvent) => void,
|
|
116
118
|
}>;
|
|
117
119
|
|
|
120
|
+
type KeyEventProps = $ReadOnly<{
|
|
121
|
+
onKeyDown?: ?(event: KeyDownEvent) => void,
|
|
122
|
+
onKeyDownCapture?: ?(event: KeyDownEvent) => void,
|
|
123
|
+
onKeyUp?: ?(event: KeyUpEvent) => void,
|
|
124
|
+
onKeyUpCapture?: ?(event: KeyUpEvent) => void,
|
|
125
|
+
}>;
|
|
126
|
+
|
|
118
127
|
type TouchEventProps = $ReadOnly<{
|
|
119
128
|
onTouchCancel?: ?(e: GestureResponderEvent) => void,
|
|
120
129
|
onTouchCancelCapture?: ?(e: GestureResponderEvent) => void,
|
|
@@ -344,7 +353,7 @@ export type ViewPropsAndroid = $ReadOnly<{
|
|
|
344
353
|
*
|
|
345
354
|
* @platform android
|
|
346
355
|
*/
|
|
347
|
-
onClick?: ?(event: GestureResponderEvent) =>
|
|
356
|
+
onClick?: ?(event: GestureResponderEvent) => unknown,
|
|
348
357
|
}>;
|
|
349
358
|
|
|
350
359
|
export type TVViewPropsIOS = $ReadOnly<{
|
|
@@ -505,6 +514,7 @@ export type ViewProps = $ReadOnly<{
|
|
|
505
514
|
...MouseEventProps,
|
|
506
515
|
...PointerEventProps,
|
|
507
516
|
...FocusEventProps,
|
|
517
|
+
...KeyEventProps,
|
|
508
518
|
...TouchEventProps,
|
|
509
519
|
...ViewPropsAndroid,
|
|
510
520
|
...ViewPropsIOS,
|
|
@@ -15,11 +15,13 @@ import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
|
|
15
15
|
import type {
|
|
16
16
|
BlurEvent,
|
|
17
17
|
FocusEvent,
|
|
18
|
+
GestureResponderEvent,
|
|
19
|
+
KeyDownEvent,
|
|
20
|
+
KeyUpEvent,
|
|
18
21
|
LayoutChangeEvent,
|
|
19
22
|
LayoutRectangle,
|
|
20
23
|
MouseEvent,
|
|
21
24
|
PointerEvent,
|
|
22
|
-
GestureResponderEvent,
|
|
23
25
|
KeyEvent, // [Windows]
|
|
24
26
|
} from '../../Types/CoreEventTypes';
|
|
25
27
|
import type {
|
|
@@ -38,7 +40,7 @@ type DirectEventProps = $ReadOnly<{
|
|
|
38
40
|
* when the user performs an accessibility custom action.
|
|
39
41
|
*
|
|
40
42
|
*/
|
|
41
|
-
onAccessibilityAction?: ?(event: AccessibilityActionEvent) =>
|
|
43
|
+
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => unknown,
|
|
42
44
|
|
|
43
45
|
/**
|
|
44
46
|
* When `accessible` is true, the system will try to invoke this function
|
|
@@ -46,7 +48,7 @@ type DirectEventProps = $ReadOnly<{
|
|
|
46
48
|
*
|
|
47
49
|
* See https://reactnative.dev/docs/view#onaccessibilitytap
|
|
48
50
|
*/
|
|
49
|
-
onAccessibilityTap?: ?() =>
|
|
51
|
+
onAccessibilityTap?: ?() => unknown,
|
|
50
52
|
|
|
51
53
|
/**
|
|
52
54
|
* Invoked on mount and layout changes with:
|
|
@@ -59,7 +61,7 @@ type DirectEventProps = $ReadOnly<{
|
|
|
59
61
|
*
|
|
60
62
|
* See https://reactnative.dev/docs/view#onlayout
|
|
61
63
|
*/
|
|
62
|
-
onLayout?: ?(event: LayoutChangeEvent) =>
|
|
64
|
+
onLayout?: ?(event: LayoutChangeEvent) => unknown,
|
|
63
65
|
|
|
64
66
|
/**
|
|
65
67
|
* When `accessible` is `true`, the system will invoke this function when the
|
|
@@ -67,7 +69,7 @@ type DirectEventProps = $ReadOnly<{
|
|
|
67
69
|
*
|
|
68
70
|
* See https://reactnative.dev/docs/view#onmagictap
|
|
69
71
|
*/
|
|
70
|
-
onMagicTap?: ?() =>
|
|
72
|
+
onMagicTap?: ?() => unknown,
|
|
71
73
|
|
|
72
74
|
/**
|
|
73
75
|
* When `accessible` is `true`, the system will invoke this function when the
|
|
@@ -75,7 +77,7 @@ type DirectEventProps = $ReadOnly<{
|
|
|
75
77
|
*
|
|
76
78
|
* See https://reactnative.dev/docs/view#onaccessibilityescape
|
|
77
79
|
*/
|
|
78
|
-
onAccessibilityEscape?: ?() =>
|
|
80
|
+
onAccessibilityEscape?: ?() => unknown,
|
|
79
81
|
}>;
|
|
80
82
|
|
|
81
83
|
type MouseEventProps = $ReadOnly<{
|
|
@@ -116,6 +118,13 @@ type FocusEventProps = $ReadOnly<{
|
|
|
116
118
|
onFocusCapture?: ?(event: FocusEvent) => void,
|
|
117
119
|
}>;
|
|
118
120
|
|
|
121
|
+
type KeyEventProps = $ReadOnly<{
|
|
122
|
+
onKeyDown?: ?(event: KeyDownEvent) => void,
|
|
123
|
+
onKeyDownCapture?: ?(event: KeyDownEvent) => void,
|
|
124
|
+
onKeyUp?: ?(event: KeyUpEvent) => void,
|
|
125
|
+
onKeyUpCapture?: ?(event: KeyUpEvent) => void,
|
|
126
|
+
}>;
|
|
127
|
+
|
|
119
128
|
type TouchEventProps = $ReadOnly<{
|
|
120
129
|
onTouchCancel?: ?(e: GestureResponderEvent) => void,
|
|
121
130
|
onTouchCancelCapture?: ?(e: GestureResponderEvent) => void,
|
|
@@ -345,7 +354,7 @@ export type ViewPropsAndroid = $ReadOnly<{
|
|
|
345
354
|
*
|
|
346
355
|
* @platform android
|
|
347
356
|
*/
|
|
348
|
-
onClick?: ?(event: GestureResponderEvent) =>
|
|
357
|
+
onClick?: ?(event: GestureResponderEvent) => unknown,
|
|
349
358
|
}>;
|
|
350
359
|
|
|
351
360
|
export type TVViewPropsIOS = $ReadOnly<{
|
|
@@ -432,12 +441,12 @@ type ViewPropsWindows = $ReadOnly<{|
|
|
|
432
441
|
*
|
|
433
442
|
* @platform windows
|
|
434
443
|
*/
|
|
435
|
-
onKeyUp?: ?(e:
|
|
436
|
-
onKeyUpCapture?: ?(e:
|
|
444
|
+
onKeyUp?: ?(e: KeyUpEvent) => void,
|
|
445
|
+
onKeyUpCapture?: ?(e: KeyUpEvent) => void,
|
|
437
446
|
keyUpEvents?: ?$ReadOnlyArray<HandledKeyboardEvent>,
|
|
438
447
|
|
|
439
|
-
onKeyDown?: ?(e:
|
|
440
|
-
onKeyDownCapture?: ?(e:
|
|
448
|
+
onKeyDown?: ?(e: KeyDownEvent) => void,
|
|
449
|
+
onKeyDownCapture?: ?(e: KeyDownEvent) => void,
|
|
441
450
|
keyDownEvents?: ?$ReadOnlyArray<HandledKeyboardEvent>,
|
|
442
451
|
/**
|
|
443
452
|
* Specifies the Tooltip for the view
|
|
@@ -577,6 +586,7 @@ export type ViewProps = $ReadOnly<{
|
|
|
577
586
|
...MouseEventProps,
|
|
578
587
|
...PointerEventProps,
|
|
579
588
|
...FocusEventProps,
|
|
589
|
+
...KeyEventProps,
|
|
580
590
|
...TouchEventProps,
|
|
581
591
|
...ViewPropsAndroid,
|
|
582
592
|
...ViewPropsIOS,
|
|
@@ -13,7 +13,10 @@ import DevLoadingView from '../../Utilities/DevLoadingView';
|
|
|
13
13
|
import HMRClient from '../../Utilities/HMRClient';
|
|
14
14
|
import getDevServer from './getDevServer';
|
|
15
15
|
|
|
16
|
-
declare var global: {
|
|
16
|
+
declare var global: {
|
|
17
|
+
globalEvalWithSourceUrl?: (string, string) => unknown,
|
|
18
|
+
...
|
|
19
|
+
};
|
|
17
20
|
|
|
18
21
|
let pendingRequests = 0;
|
|
19
22
|
|
|
@@ -26,7 +29,7 @@ export class LoadBundleFromServerError extends Error {
|
|
|
26
29
|
message: string,
|
|
27
30
|
url: string,
|
|
28
31
|
isTimeout: boolean,
|
|
29
|
-
options?: {cause:
|
|
32
|
+
options?: {cause: unknown, ...},
|
|
30
33
|
): void {
|
|
31
34
|
super(message, options);
|
|
32
35
|
this.url = url;
|
|
@@ -40,7 +43,7 @@ export class LoadBundleFromServerRequestError extends LoadBundleFromServerError
|
|
|
40
43
|
message: string,
|
|
41
44
|
url: string,
|
|
42
45
|
isTimeout: boolean,
|
|
43
|
-
options?: {cause:
|
|
46
|
+
options?: {cause: unknown, ...},
|
|
44
47
|
): void {
|
|
45
48
|
super(message, url, isTimeout, options);
|
|
46
49
|
this.name = 'LoadBundleFromServerRequestError';
|
|
@@ -13,7 +13,10 @@ import DevLoadingView from '../../Utilities/DevLoadingView';
|
|
|
13
13
|
import HMRClient from '../../Utilities/HMRClient';
|
|
14
14
|
import getDevServer from './getDevServer';
|
|
15
15
|
|
|
16
|
-
declare var global: {
|
|
16
|
+
declare var global: {
|
|
17
|
+
globalEvalWithSourceUrl?: (string, string) => unknown,
|
|
18
|
+
...
|
|
19
|
+
};
|
|
17
20
|
|
|
18
21
|
let pendingRequests = 0;
|
|
19
22
|
|
|
@@ -26,7 +29,7 @@ export class LoadBundleFromServerError extends Error {
|
|
|
26
29
|
message: string,
|
|
27
30
|
url: string,
|
|
28
31
|
isTimeout: boolean,
|
|
29
|
-
options?: {cause:
|
|
32
|
+
options?: {cause: unknown, ...},
|
|
30
33
|
): void {
|
|
31
34
|
super(message, options);
|
|
32
35
|
this.url = url;
|
|
@@ -40,7 +43,7 @@ export class LoadBundleFromServerRequestError extends LoadBundleFromServerError
|
|
|
40
43
|
message: string,
|
|
41
44
|
url: string,
|
|
42
45
|
isTimeout: boolean,
|
|
43
|
-
options?: {cause:
|
|
46
|
+
options?: {cause: unknown, ...},
|
|
44
47
|
): void {
|
|
45
48
|
super(message, url, isTimeout, options);
|
|
46
49
|
this.name = 'LoadBundleFromServerRequestError';
|
|
@@ -31,7 +31,7 @@ export type SymbolicatedStackTrace = $ReadOnly<{
|
|
|
31
31
|
|
|
32
32
|
export default async function symbolicateStackTrace(
|
|
33
33
|
stack: Array<StackFrame>,
|
|
34
|
-
extraData?:
|
|
34
|
+
extraData?: unknown,
|
|
35
35
|
): Promise<SymbolicatedStackTrace> {
|
|
36
36
|
const devServer = getDevServer();
|
|
37
37
|
if (!devServer.bundleLoadedFromServer) {
|
|
@@ -135,8 +135,8 @@ function reportException(
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
declare var console: {
|
|
138
|
-
error: (...data: $ReadOnlyArray<
|
|
139
|
-
_errorOriginal: (...data: $ReadOnlyArray<
|
|
138
|
+
error: (...data: $ReadOnlyArray<unknown>) => void,
|
|
139
|
+
_errorOriginal: (...data: $ReadOnlyArray<unknown>) => void,
|
|
140
140
|
reportErrorsAsExceptions: boolean,
|
|
141
141
|
...
|
|
142
142
|
};
|
|
@@ -148,7 +148,7 @@ let inExceptionHandler = false;
|
|
|
148
148
|
/**
|
|
149
149
|
* Logs exceptions to the (native) console and displays them
|
|
150
150
|
*/
|
|
151
|
-
function handleException(e:
|
|
151
|
+
function handleException(e: unknown, isFatal: boolean) {
|
|
152
152
|
// TODO(T196834299): We should really use a c++ turbomodule for this
|
|
153
153
|
const reportToConsole = true;
|
|
154
154
|
if (
|
|
@@ -17,7 +17,7 @@ export type RawEventEmitterEvent = $ReadOnly<{
|
|
|
17
17
|
// We expect, but do not/cannot require, that nativeEvent is an object
|
|
18
18
|
// with the properties: key, elementType (string), type (string), tag (numeric),
|
|
19
19
|
// and a stateNode of the native element/Fiber the event was emitted to.
|
|
20
|
-
nativeEvent: {[string]:
|
|
20
|
+
nativeEvent: {[string]: unknown},
|
|
21
21
|
}>;
|
|
22
22
|
|
|
23
23
|
type RawEventDefinitions = {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
*/
|
|
28
28
|
export default class ReactNativeVersion {
|
|
29
29
|
static major: number = 0;
|
|
30
|
-
static minor: number =
|
|
31
|
-
static patch: number =
|
|
32
|
-
static prerelease: string | null =
|
|
30
|
+
static minor: number = 84;
|
|
31
|
+
static patch: number = 1;
|
|
32
|
+
static prerelease: string | null = null;
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -37,7 +37,7 @@ if (__DEV__) {
|
|
|
37
37
|
] as const
|
|
38
38
|
).forEach(level => {
|
|
39
39
|
const originalFunction = console[level];
|
|
40
|
-
console[level] = function (...args: $ReadOnlyArray<
|
|
40
|
+
console[level] = function (...args: $ReadOnlyArray<unknown>) {
|
|
41
41
|
HMRClient.log(level, args);
|
|
42
42
|
originalFunction.apply(console, args);
|
|
43
43
|
};
|
|
@@ -20,7 +20,7 @@ if (global.RN$useAlwaysAvailableJSErrorHandling !== true) {
|
|
|
20
20
|
|
|
21
21
|
// Set up error handler
|
|
22
22
|
if (!global.__fbDisableExceptionsManager) {
|
|
23
|
-
const handleError = (e:
|
|
23
|
+
const handleError = (e: unknown, isFatal: boolean) => {
|
|
24
24
|
try {
|
|
25
25
|
ExceptionsManager.handleException(e, isFatal);
|
|
26
26
|
} catch (ee) {
|
|
@@ -85,8 +85,8 @@ export default class NativeEventEmitter<
|
|
|
85
85
|
|
|
86
86
|
addListener<TEvent: $Keys<TEventToArgsMap>>(
|
|
87
87
|
eventType: TEvent,
|
|
88
|
-
listener: (...args: TEventToArgsMap[TEvent]) =>
|
|
89
|
-
context?:
|
|
88
|
+
listener: (...args: TEventToArgsMap[TEvent]) => unknown,
|
|
89
|
+
context?: unknown,
|
|
90
90
|
): EventSubscription {
|
|
91
91
|
this._nativeModule?.addListener(eventType);
|
|
92
92
|
let subscription: ?EventSubscription = RCTDeviceEventEmitter.addListener(
|
|
@@ -48,7 +48,7 @@ function generateRequestId() {
|
|
|
48
48
|
function getSize(
|
|
49
49
|
url: string,
|
|
50
50
|
success?: (width: number, height: number) => void,
|
|
51
|
-
failure?: (error:
|
|
51
|
+
failure?: (error: unknown) => void,
|
|
52
52
|
): void | Promise<ImageSize> {
|
|
53
53
|
const promise = NativeImageLoaderAndroid.getSize(url);
|
|
54
54
|
if (typeof success !== 'function') {
|
|
@@ -74,7 +74,7 @@ function getSizeWithHeaders(
|
|
|
74
74
|
url: string,
|
|
75
75
|
headers: {[string]: string, ...},
|
|
76
76
|
success?: (width: number, height: number) => void,
|
|
77
|
-
failure?: (error:
|
|
77
|
+
failure?: (error: unknown) => void,
|
|
78
78
|
): void | Promise<ImageSize> {
|
|
79
79
|
const promise = NativeImageLoaderAndroid.getSizeWithHeaders(url, headers);
|
|
80
80
|
if (typeof success !== 'function') {
|
|
@@ -33,7 +33,7 @@ import * as React from 'react';
|
|
|
33
33
|
function getSize(
|
|
34
34
|
uri: string,
|
|
35
35
|
success?: (width: number, height: number) => void,
|
|
36
|
-
failure?: (error:
|
|
36
|
+
failure?: (error: unknown) => void,
|
|
37
37
|
): void | Promise<ImageSize> {
|
|
38
38
|
const promise = NativeImageLoaderIOS.getSize(uri).then(([width, height]) => ({
|
|
39
39
|
width,
|
|
@@ -56,7 +56,7 @@ function getSizeWithHeaders(
|
|
|
56
56
|
uri: string,
|
|
57
57
|
headers: {[string]: string, ...},
|
|
58
58
|
success?: (width: number, height: number) => void,
|
|
59
|
-
failure?: (error:
|
|
59
|
+
failure?: (error: unknown) => void,
|
|
60
60
|
): void | Promise<ImageSize> {
|
|
61
61
|
const promise = NativeImageLoaderIOS.getSizeWithHeaders(uri, headers);
|
|
62
62
|
if (typeof success !== 'function') {
|
|
@@ -35,7 +35,7 @@ import * as React from 'react';
|
|
|
35
35
|
function getSize(
|
|
36
36
|
uri: string,
|
|
37
37
|
success?: (width: number, height: number) => void,
|
|
38
|
-
failure?: (error:
|
|
38
|
+
failure?: (error: unknown) => void,
|
|
39
39
|
): void | Promise<ImageSize> {
|
|
40
40
|
const promise = NativeImageLoaderIOS.getSize(uri).then(([width, height]) => ({
|
|
41
41
|
width,
|
|
@@ -58,7 +58,7 @@ function getSizeWithHeaders(
|
|
|
58
58
|
uri: string,
|
|
59
59
|
headers: {[string]: string, ...},
|
|
60
60
|
success?: (width: number, height: number) => void,
|
|
61
|
-
failure?: (error:
|
|
61
|
+
failure?: (error: unknown) => void,
|
|
62
62
|
): void | Promise<ImageSize> {
|
|
63
63
|
const promise = NativeImageLoaderIOS.getSizeWithHeaders(uri, headers);
|
|
64
64
|
if (typeof success !== 'function') {
|
|
@@ -220,7 +220,7 @@ export type ImagePropsBase = $ReadOnly<{
|
|
|
220
220
|
* See https://reactnative.dev/docs/image#onlayout
|
|
221
221
|
*/
|
|
222
222
|
|
|
223
|
-
onLayout?: ?(event: LayoutChangeEvent) =>
|
|
223
|
+
onLayout?: ?(event: LayoutChangeEvent) => unknown,
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
226
|
* Invoked when load completes successfully.
|
|
@@ -28,7 +28,7 @@ type ImageComponentStaticsIOS = $ReadOnly<{
|
|
|
28
28
|
getSize(
|
|
29
29
|
uri: string,
|
|
30
30
|
success: (width: number, height: number) => void,
|
|
31
|
-
failure?: (error:
|
|
31
|
+
failure?: (error: unknown) => void,
|
|
32
32
|
): void,
|
|
33
33
|
|
|
34
34
|
getSizeWithHeaders(
|
|
@@ -39,7 +39,7 @@ type ImageComponentStaticsIOS = $ReadOnly<{
|
|
|
39
39
|
uri: string,
|
|
40
40
|
headers: {[string]: string, ...},
|
|
41
41
|
success: (width: number, height: number) => void,
|
|
42
|
-
failure?: (error:
|
|
42
|
+
failure?: (error: unknown) => void,
|
|
43
43
|
): void,
|
|
44
44
|
|
|
45
45
|
prefetch(url: string): Promise<boolean>,
|
|
@@ -98,7 +98,7 @@ const InteractionManagerStub = {
|
|
|
98
98
|
runAfterInteractions(task: ?Task): {
|
|
99
99
|
then: <U>(
|
|
100
100
|
onFulfill?: ?(void) => ?(Promise<U> | U),
|
|
101
|
-
onReject?: ?(error:
|
|
101
|
+
onReject?: ?(error: unknown) => ?(Promise<U> | U),
|
|
102
102
|
) => Promise<U>,
|
|
103
103
|
cancel: () => void,
|
|
104
104
|
...
|
|
@@ -165,8 +165,8 @@ const InteractionManagerStub = {
|
|
|
165
165
|
addListener(
|
|
166
166
|
eventType: string,
|
|
167
167
|
// $FlowFixMe[unclear-type]
|
|
168
|
-
listener: (...args: any) =>
|
|
169
|
-
context:
|
|
168
|
+
listener: (...args: any) => unknown,
|
|
169
|
+
context: unknown,
|
|
170
170
|
): EventSubscription {
|
|
171
171
|
return {
|
|
172
172
|
remove() {},
|
|
@@ -187,7 +187,7 @@ type ActiveCallback = (
|
|
|
187
187
|
type PassiveCallback = (
|
|
188
188
|
event: GestureResponderEvent,
|
|
189
189
|
gestureState: PanResponderGestureState,
|
|
190
|
-
) =>
|
|
190
|
+
) => unknown;
|
|
191
191
|
|
|
192
192
|
export type GestureResponderHandlerMethods = {
|
|
193
193
|
onMoveShouldSetResponder: (event: GestureResponderEvent) => boolean,
|
|
@@ -201,7 +201,7 @@ const LayoutAnimation = {
|
|
|
201
201
|
scaleY: 'scaleY',
|
|
202
202
|
scaleXY: 'scaleXY',
|
|
203
203
|
}) as LayoutAnimationProperties,
|
|
204
|
-
checkConfig(...args: Array<
|
|
204
|
+
checkConfig(...args: Array<unknown>) {
|
|
205
205
|
console.error('LayoutAnimation.checkConfig(...) has been disabled.');
|
|
206
206
|
},
|
|
207
207
|
Presets,
|
|
@@ -34,7 +34,7 @@ class LinkingImpl extends NativeEventEmitter<LinkingEventDefinitions> {
|
|
|
34
34
|
*/
|
|
35
35
|
addEventListener<K: $Keys<LinkingEventDefinitions>>(
|
|
36
36
|
eventType: K,
|
|
37
|
-
listener: (...LinkingEventDefinitions[K]) =>
|
|
37
|
+
listener: (...LinkingEventDefinitions[K]) => unknown,
|
|
38
38
|
): EventSubscription {
|
|
39
39
|
return this.addListener(eventType, listener);
|
|
40
40
|
}
|
|
@@ -172,7 +172,7 @@ function numColumnsOrDefault(numColumns: ?number) {
|
|
|
172
172
|
return numColumns ?? 1;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
function isArrayLike(data:
|
|
175
|
+
function isArrayLike(data: unknown): boolean {
|
|
176
176
|
// $FlowExpectedError[incompatible-use]
|
|
177
177
|
return typeof Object(data).length === 'number';
|
|
178
178
|
}
|
|
@@ -413,7 +413,7 @@ class FlatList<ItemT = any> extends React.PureComponent<FlatListProps<ItemT>> {
|
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
setNativeProps(props: {[string]:
|
|
416
|
+
setNativeProps(props: {[string]: unknown, ...}) {
|
|
417
417
|
if (this._listRef) {
|
|
418
418
|
this._listRef.setNativeProps(props);
|
|
419
419
|
}
|