@office-iss/react-native-win32 0.83.0-preview.1 → 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/CHANGELOG.json +57 -6
- package/CHANGELOG.md +30 -5
- package/IntegrationTests/AccessibilityManagerTest.js +10 -7
- package/IntegrationTests/ImageCachePolicyTest.js +8 -8
- package/IntegrationTests/IntegrationTestsApp.js +3 -3
- package/IntegrationTests/LayoutEventsTest.js +1 -1
- package/IntegrationTests/TimersTest.js +1 -1
- package/IntegrationTests/WebSocketTest.js +1 -1
- 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 +6 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +6 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +8 -1
- package/Libraries/Components/Button.js +2 -5
- package/Libraries/Components/Button.win32.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.win32.js +14 -13
- package/Libraries/Components/TextInput/TextInput.flow.js +13 -13
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +13 -13
- package/Libraries/Components/TextInput/TextInput.js +33 -34
- package/Libraries/Components/TextInput/TextInput.win32.js +39 -39
- package/Libraries/Components/Touchable/PooledClass.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +3 -3
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +9 -9
- package/Libraries/Components/View/View.win32.js +5 -5
- package/Libraries/Components/View/ViewPropTypes.js +16 -6
- package/Libraries/Components/View/ViewPropTypes.win32.js +20 -10
- package/Libraries/Core/Devtools/loadBundleFromServer.js +6 -3
- package/Libraries/Core/Devtools/loadBundleFromServer.win32.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.win32.js +1 -1
- 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/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.win32.js +2 -2
- package/Libraries/Pressability/Pressability.js +9 -9
- package/Libraries/Pressability/Pressability.win32.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.win32.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.win32.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.win32.js +46 -6
- package/Libraries/Text/TextNativeComponent.js +1 -1
- package/Libraries/Text/TextNativeComponent.win32.js +1 -1
- package/Libraries/Text/TextProps.js +7 -7
- package/Libraries/Text/TextProps.win32.js +7 -7
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.js +31 -0
- package/Libraries/Types/CoreEventTypes.win32.js +30 -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/flow/HermesInternalType.js +6 -6
- package/flow/bom.js.flow +35 -28
- package/flow/cssom.js.flow +3 -3
- package/flow/dom.js.flow +34 -33
- package/index.js +3 -0
- package/index.win32.js +3 -0
- package/index.win32.js.flow +8 -0
- package/jest/mock.js +2 -2
- package/jest/mockComponent.js +1 -1
- package/jest/setup.js +1 -1
- package/overrides.json +23 -23
- package/package.json +19 -18
- package/src/private/animated/NativeAnimatedHelper.js +130 -125
- package/src/private/animated/NativeAnimatedHelper.win32.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/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +6 -0
- package/src-win/index.win32.js.flow +8 -0
- package/src/private/devsupport/devmenu/elementinspector/NetworkOverlay.js +0 -628
- package/src/private/devsupport/devmenu/perfmonitor/PerformanceOverlay.js +0 -66
|
@@ -8,12 +8,15 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import type {RootTag} from '../../Types/RootTagTypes';
|
|
11
12
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
12
13
|
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
13
14
|
import type {AnimatedStyleAllowlist} from './AnimatedStyle';
|
|
14
15
|
|
|
15
16
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
17
|
+
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
16
18
|
import {findNodeHandle} from '../../ReactNative/RendererProxy';
|
|
19
|
+
import {getNodeFromPublicInstance} from '../../ReactPrivate/ReactNativePrivateInterface';
|
|
17
20
|
import flattenStyle from '../../StyleSheet/flattenStyle';
|
|
18
21
|
import {AnimatedEvent} from '../AnimatedEvent';
|
|
19
22
|
import AnimatedNode from './AnimatedNode';
|
|
@@ -33,12 +36,12 @@ type TargetView = {
|
|
|
33
36
|
type TargetViewInstance = React.ElementRef<React.ElementType>;
|
|
34
37
|
|
|
35
38
|
function createAnimatedProps(
|
|
36
|
-
inputProps: {[string]:
|
|
39
|
+
inputProps: {[string]: unknown},
|
|
37
40
|
allowlist: ?AnimatedPropsAllowlist,
|
|
38
|
-
): [$ReadOnlyArray<string>, $ReadOnlyArray<AnimatedNode>, {[string]:
|
|
41
|
+
): [$ReadOnlyArray<string>, $ReadOnlyArray<AnimatedNode>, {[string]: unknown}] {
|
|
39
42
|
const nodeKeys: Array<string> = [];
|
|
40
43
|
const nodes: Array<AnimatedNode> = [];
|
|
41
|
-
const props: {[string]:
|
|
44
|
+
const props: {[string]: unknown} = {};
|
|
42
45
|
|
|
43
46
|
const keys = Object.keys(inputProps);
|
|
44
47
|
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
@@ -95,13 +98,15 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
95
98
|
_callback: () => void;
|
|
96
99
|
_nodeKeys: $ReadOnlyArray<string>;
|
|
97
100
|
_nodes: $ReadOnlyArray<AnimatedNode>;
|
|
98
|
-
_props: {[string]:
|
|
101
|
+
_props: {[string]: unknown};
|
|
99
102
|
_target: ?TargetView = null;
|
|
103
|
+
_rootTag: ?RootTag = undefined;
|
|
100
104
|
|
|
101
105
|
constructor(
|
|
102
|
-
inputProps: {[string]:
|
|
106
|
+
inputProps: {[string]: unknown},
|
|
103
107
|
callback: () => void,
|
|
104
108
|
allowlist?: ?AnimatedPropsAllowlist,
|
|
109
|
+
rootTag?: RootTag,
|
|
105
110
|
config?: ?AnimatedNodeConfig,
|
|
106
111
|
) {
|
|
107
112
|
super(config);
|
|
@@ -110,10 +115,11 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
110
115
|
this._nodes = nodes;
|
|
111
116
|
this._props = props;
|
|
112
117
|
this._callback = callback;
|
|
118
|
+
this._rootTag = rootTag;
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
__getValue(): Object {
|
|
116
|
-
const props: {[string]:
|
|
122
|
+
const props: {[string]: unknown} = {};
|
|
117
123
|
|
|
118
124
|
const keys = Object.keys(this._props);
|
|
119
125
|
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
@@ -138,7 +144,7 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
138
144
|
* created by this `AnimatedProps` instance.
|
|
139
145
|
*/
|
|
140
146
|
__getValueWithStaticProps(staticProps: Object): Object {
|
|
141
|
-
const props: {[string]:
|
|
147
|
+
const props: {[string]: unknown} = {...staticProps};
|
|
142
148
|
|
|
143
149
|
const keys = Object.keys(staticProps);
|
|
144
150
|
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
@@ -149,7 +155,7 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
149
155
|
const staticStyle = staticProps.style;
|
|
150
156
|
const flatStaticStyle = flattenStyle(staticStyle);
|
|
151
157
|
if (maybeNode instanceof AnimatedStyle) {
|
|
152
|
-
const mutableStyle: {[string]:
|
|
158
|
+
const mutableStyle: {[string]: unknown} =
|
|
153
159
|
flatStaticStyle == null
|
|
154
160
|
? {}
|
|
155
161
|
: flatStaticStyle === staticStyle
|
|
@@ -190,7 +196,7 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
190
196
|
}
|
|
191
197
|
|
|
192
198
|
__getAnimatedValue(): Object {
|
|
193
|
-
const props: {[string]:
|
|
199
|
+
const props: {[string]: unknown} = {};
|
|
194
200
|
|
|
195
201
|
const nodeKeys = this._nodeKeys;
|
|
196
202
|
const nodes = this._nodes;
|
|
@@ -247,7 +253,9 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
247
253
|
super.__setPlatformConfig(platformConfig);
|
|
248
254
|
|
|
249
255
|
if (this._target != null) {
|
|
250
|
-
this
|
|
256
|
+
const target = this._target;
|
|
257
|
+
this.#connectAnimatedView(target);
|
|
258
|
+
this.#connectShadowNode(target);
|
|
251
259
|
}
|
|
252
260
|
}
|
|
253
261
|
}
|
|
@@ -256,9 +264,10 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
256
264
|
if (this._target?.instance === instance) {
|
|
257
265
|
return;
|
|
258
266
|
}
|
|
259
|
-
this._target = {instance, connectedViewTag: null};
|
|
267
|
+
const target = (this._target = {instance, connectedViewTag: null});
|
|
260
268
|
if (this.__isNative) {
|
|
261
|
-
this.#connectAnimatedView(
|
|
269
|
+
this.#connectAnimatedView(target);
|
|
270
|
+
this.#connectShadowNode(target);
|
|
262
271
|
}
|
|
263
272
|
}
|
|
264
273
|
|
|
@@ -279,6 +288,27 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
279
288
|
target.connectedViewTag = viewTag;
|
|
280
289
|
}
|
|
281
290
|
|
|
291
|
+
#connectShadowNode(target: TargetView): void {
|
|
292
|
+
if (
|
|
293
|
+
!ReactNativeFeatureFlags.cxxNativeAnimatedEnabled() ||
|
|
294
|
+
//eslint-disable-next-line
|
|
295
|
+
!ReactNativeFeatureFlags.useSharedAnimatedBackend()
|
|
296
|
+
) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
invariant(this.__isNative, 'Expected node to be marked as "native"');
|
|
301
|
+
// $FlowExpectedError[incompatible-type] - target.instance may be an HTMLElement but we need ReactNativeElement for Fabric
|
|
302
|
+
const shadowNode = getNodeFromPublicInstance(target.instance);
|
|
303
|
+
if (shadowNode == null) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
NativeAnimatedHelper.API.connectAnimatedNodeToShadowNodeFamily(
|
|
307
|
+
this.__getNativeTag(),
|
|
308
|
+
shadowNode,
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
|
|
282
312
|
#disconnectAnimatedView(target: TargetView): void {
|
|
283
313
|
invariant(this.__isNative, 'Expected node to be marked as "native"');
|
|
284
314
|
const viewTag = target.connectedViewTag;
|
|
@@ -318,6 +348,7 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
318
348
|
return {
|
|
319
349
|
type: 'props',
|
|
320
350
|
props: propsConfig,
|
|
351
|
+
rootTag: this._rootTag ?? undefined,
|
|
321
352
|
debugID: this.__getDebugID(),
|
|
322
353
|
};
|
|
323
354
|
}
|
|
@@ -21,17 +21,17 @@ import AnimatedWithChildren from './AnimatedWithChildren';
|
|
|
21
21
|
|
|
22
22
|
export type AnimatedStyleAllowlist = $ReadOnly<{[string]: true}>;
|
|
23
23
|
|
|
24
|
-
type FlatStyle = {[string]:
|
|
25
|
-
type FlatStyleForWeb<TStyle: FlatStyle> = [
|
|
24
|
+
type FlatStyle = {[string]: unknown};
|
|
25
|
+
type FlatStyleForWeb<TStyle: FlatStyle> = [unknown, TStyle];
|
|
26
26
|
|
|
27
27
|
function createAnimatedStyle(
|
|
28
28
|
flatStyle: FlatStyle,
|
|
29
29
|
allowlist: ?AnimatedStyleAllowlist,
|
|
30
30
|
keepUnanimatedValues: boolean,
|
|
31
|
-
): [$ReadOnlyArray<string>, $ReadOnlyArray<AnimatedNode>, {[string]:
|
|
31
|
+
): [$ReadOnlyArray<string>, $ReadOnlyArray<AnimatedNode>, {[string]: unknown}] {
|
|
32
32
|
const nodeKeys: Array<string> = [];
|
|
33
33
|
const nodes: Array<AnimatedNode> = [];
|
|
34
|
-
const style: {[string]:
|
|
34
|
+
const style: {[string]: unknown} = {};
|
|
35
35
|
|
|
36
36
|
const keys = Object.keys(flatStyle);
|
|
37
37
|
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
@@ -82,10 +82,10 @@ function createAnimatedStyle(
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
export default class AnimatedStyle extends AnimatedWithChildren {
|
|
85
|
-
_originalStyleForWeb: ?
|
|
85
|
+
_originalStyleForWeb: ?unknown;
|
|
86
86
|
_nodeKeys: $ReadOnlyArray<string>;
|
|
87
87
|
_nodes: $ReadOnlyArray<AnimatedNode>;
|
|
88
|
-
_style: {[string]:
|
|
88
|
+
_style: {[string]: unknown};
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Creates an `AnimatedStyle` if `value` contains `AnimatedNode` instances.
|
|
@@ -94,7 +94,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
94
94
|
static from(
|
|
95
95
|
flatStyle: ?FlatStyle,
|
|
96
96
|
allowlist: ?AnimatedStyleAllowlist,
|
|
97
|
-
originalStyleForWeb: ?
|
|
97
|
+
originalStyleForWeb: ?unknown,
|
|
98
98
|
): ?AnimatedStyle {
|
|
99
99
|
if (flatStyle == null) {
|
|
100
100
|
return null;
|
|
@@ -115,8 +115,8 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
115
115
|
constructor(
|
|
116
116
|
nodeKeys: $ReadOnlyArray<string>,
|
|
117
117
|
nodes: $ReadOnlyArray<AnimatedNode>,
|
|
118
|
-
style: {[string]:
|
|
119
|
-
originalStyleForWeb: ?
|
|
118
|
+
style: {[string]: unknown},
|
|
119
|
+
originalStyleForWeb: ?unknown,
|
|
120
120
|
config?: ?AnimatedNodeConfig,
|
|
121
121
|
) {
|
|
122
122
|
super(config);
|
|
@@ -134,7 +134,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
__getValue(): FlatStyleForWeb<FlatStyle> | FlatStyle {
|
|
137
|
-
const style: {[string]:
|
|
137
|
+
const style: {[string]: unknown} = {};
|
|
138
138
|
|
|
139
139
|
const keys = Object.keys(this._style);
|
|
140
140
|
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
@@ -164,7 +164,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
164
164
|
* Mutates the supplied `style` object such that animated nodes are replaced
|
|
165
165
|
* with rasterized values.
|
|
166
166
|
*/
|
|
167
|
-
__replaceAnimatedNodeWithValues(style: {[string]:
|
|
167
|
+
__replaceAnimatedNodeWithValues(style: {[string]: unknown}): void {
|
|
168
168
|
const keys = Object.keys(style);
|
|
169
169
|
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
170
170
|
const key = keys[ii];
|
|
@@ -185,7 +185,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
__getAnimatedValue(): Object {
|
|
188
|
-
const style: {[string]:
|
|
188
|
+
const style: {[string]: unknown} = {};
|
|
189
189
|
|
|
190
190
|
const nodeKeys = this._nodeKeys;
|
|
191
191
|
const nodes = this._nodes;
|
|
@@ -12,7 +12,10 @@ import type {EventSubscription} from '../../vendor/emitter/EventEmitter';
|
|
|
12
12
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
13
13
|
import type Animation from '../animations/Animation';
|
|
14
14
|
import type {EndCallback} from '../animations/Animation';
|
|
15
|
-
import type {
|
|
15
|
+
import type {
|
|
16
|
+
InterpolationConfigSupportedOutputType,
|
|
17
|
+
InterpolationConfigType,
|
|
18
|
+
} from './AnimatedInterpolation';
|
|
16
19
|
import type AnimatedNode from './AnimatedNode';
|
|
17
20
|
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
18
21
|
import type AnimatedTracking from './AnimatedTracking';
|
|
@@ -131,7 +134,7 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
136
|
|
|
134
|
-
addListener(callback: (value: any) =>
|
|
137
|
+
addListener(callback: (value: any) => unknown): string {
|
|
135
138
|
const id = super.addListener(callback);
|
|
136
139
|
this._listenerCount++;
|
|
137
140
|
if (this.__isNative) {
|
|
@@ -298,7 +301,7 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
298
301
|
* Interpolates the value before updating the property, e.g. mapping 0-1 to
|
|
299
302
|
* 0-10.
|
|
300
303
|
*/
|
|
301
|
-
interpolate<OutputT:
|
|
304
|
+
interpolate<OutputT: InterpolationConfigSupportedOutputType>(
|
|
302
305
|
config: InterpolationConfigType<OutputT>,
|
|
303
306
|
): AnimatedInterpolation<OutputT> {
|
|
304
307
|
return new AnimatedInterpolation(this, config);
|
|
@@ -21,7 +21,7 @@ export type AnimatedValueXYConfig = $ReadOnly<{
|
|
|
21
21
|
...AnimatedNodeConfig,
|
|
22
22
|
useNativeDriver: boolean,
|
|
23
23
|
}>;
|
|
24
|
-
type ValueXYListenerCallback = (value: {x: number, y: number, ...}) =>
|
|
24
|
+
type ValueXYListenerCallback = (value: {x: number, y: number, ...}) => unknown;
|
|
25
25
|
|
|
26
26
|
let _uniqueId = 1;
|
|
27
27
|
|
|
@@ -23,7 +23,7 @@ export type SpyData = {
|
|
|
23
23
|
type: number,
|
|
24
24
|
module: ?string,
|
|
25
25
|
method: string | number,
|
|
26
|
-
args:
|
|
26
|
+
args: unknown[],
|
|
27
27
|
...
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -42,9 +42,9 @@ const DEBUG_INFO_LIMIT = 32;
|
|
|
42
42
|
|
|
43
43
|
class MessageQueue {
|
|
44
44
|
_lazyCallableModules: {[key: string]: (void) => {...}, ...};
|
|
45
|
-
_queue: [number[], number[],
|
|
46
|
-
_successCallbacks: Map<number, ?(...
|
|
47
|
-
_failureCallbacks: Map<number, ?(...
|
|
45
|
+
_queue: [number[], number[], unknown[], number];
|
|
46
|
+
_successCallbacks: Map<number, ?(...unknown[]) => void>;
|
|
47
|
+
_failureCallbacks: Map<number, ?(...unknown[]) => void>;
|
|
48
48
|
_callID: number;
|
|
49
49
|
_lastFlush: number;
|
|
50
50
|
_eventLoopStartTime: number;
|
|
@@ -109,8 +109,8 @@ class MessageQueue {
|
|
|
109
109
|
callFunctionReturnFlushedQueue(
|
|
110
110
|
module: string,
|
|
111
111
|
method: string,
|
|
112
|
-
args:
|
|
113
|
-
): null | [Array<number>, Array<number>, Array<
|
|
112
|
+
args: unknown[],
|
|
113
|
+
): null | [Array<number>, Array<number>, Array<unknown>, number] {
|
|
114
114
|
this.__guard(() => {
|
|
115
115
|
this.__callFunction(module, method, args);
|
|
116
116
|
});
|
|
@@ -120,8 +120,8 @@ class MessageQueue {
|
|
|
120
120
|
|
|
121
121
|
invokeCallbackAndReturnFlushedQueue(
|
|
122
122
|
cbID: number,
|
|
123
|
-
args:
|
|
124
|
-
): null | [Array<number>, Array<number>, Array<
|
|
123
|
+
args: unknown[],
|
|
124
|
+
): null | [Array<number>, Array<number>, Array<unknown>, number] {
|
|
125
125
|
this.__guard(() => {
|
|
126
126
|
this.__invokeCallback(cbID, args);
|
|
127
127
|
});
|
|
@@ -129,7 +129,9 @@ class MessageQueue {
|
|
|
129
129
|
return this.flushedQueue();
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
flushedQueue():
|
|
132
|
+
flushedQueue():
|
|
133
|
+
| null
|
|
134
|
+
| [Array<number>, Array<number>, Array<unknown>, number] {
|
|
133
135
|
this.__guard(() => {
|
|
134
136
|
this.__callReactNativeMicrotasks();
|
|
135
137
|
});
|
|
@@ -171,10 +173,10 @@ class MessageQueue {
|
|
|
171
173
|
callNativeSyncHook(
|
|
172
174
|
moduleID: number,
|
|
173
175
|
methodID: number,
|
|
174
|
-
params:
|
|
175
|
-
onFail: ?(...
|
|
176
|
-
onSucc: ?(...
|
|
177
|
-
):
|
|
176
|
+
params: unknown[],
|
|
177
|
+
onFail: ?(...unknown[]) => void,
|
|
178
|
+
onSucc: ?(...unknown[]) => void,
|
|
179
|
+
): unknown {
|
|
178
180
|
if (__DEV__) {
|
|
179
181
|
invariant(
|
|
180
182
|
global.nativeCallSyncHook,
|
|
@@ -191,9 +193,9 @@ class MessageQueue {
|
|
|
191
193
|
processCallbacks(
|
|
192
194
|
moduleID: number,
|
|
193
195
|
methodID: number,
|
|
194
|
-
params:
|
|
195
|
-
onFail: ?(...
|
|
196
|
-
onSucc: ?(...
|
|
196
|
+
params: unknown[],
|
|
197
|
+
onFail: ?(...unknown[]) => void,
|
|
198
|
+
onSucc: ?(...unknown[]) => void,
|
|
197
199
|
): void {
|
|
198
200
|
if (onFail || onSucc) {
|
|
199
201
|
if (__DEV__) {
|
|
@@ -242,9 +244,9 @@ class MessageQueue {
|
|
|
242
244
|
enqueueNativeCall(
|
|
243
245
|
moduleID: number,
|
|
244
246
|
methodID: number,
|
|
245
|
-
params:
|
|
246
|
-
onFail: ?(...
|
|
247
|
-
onSucc: ?(...
|
|
247
|
+
params: unknown[],
|
|
248
|
+
onFail: ?(...unknown[]) => void,
|
|
249
|
+
onSucc: ?(...unknown[]) => void,
|
|
248
250
|
): void {
|
|
249
251
|
this.processCallbacks(moduleID, methodID, params, onFail, onSucc);
|
|
250
252
|
|
|
@@ -256,7 +258,7 @@ class MessageQueue {
|
|
|
256
258
|
// folly-convertible. As a special case, if a prop value is a
|
|
257
259
|
// function it is permitted here, and special-cased in the
|
|
258
260
|
// conversion.
|
|
259
|
-
const isValidArgument = (val:
|
|
261
|
+
const isValidArgument = (val: unknown): boolean => {
|
|
260
262
|
switch (typeof val) {
|
|
261
263
|
case 'undefined':
|
|
262
264
|
case 'boolean':
|
|
@@ -401,7 +403,7 @@ class MessageQueue {
|
|
|
401
403
|
}
|
|
402
404
|
}
|
|
403
405
|
|
|
404
|
-
__callFunction(module: string, method: string, args:
|
|
406
|
+
__callFunction(module: string, method: string, args: unknown[]): void {
|
|
405
407
|
this._lastFlush = Date.now();
|
|
406
408
|
this._eventLoopStartTime = this._lastFlush;
|
|
407
409
|
if (__DEV__ || this.__spy) {
|
|
@@ -441,7 +443,7 @@ class MessageQueue {
|
|
|
441
443
|
}
|
|
442
444
|
}
|
|
443
445
|
|
|
444
|
-
__invokeCallback(cbID: number, args:
|
|
446
|
+
__invokeCallback(cbID: number, args: unknown[]): void {
|
|
445
447
|
this._lastFlush = Date.now();
|
|
446
448
|
this._eventLoopStartTime = this._lastFlush;
|
|
447
449
|
|
package/Libraries/Blob/URL.js
CHANGED
|
@@ -90,11 +90,15 @@ export class URL {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
// Only add trailing slash if URL has no path (just domain)
|
|
93
94
|
if (
|
|
94
95
|
!this._url.endsWith('/') &&
|
|
95
96
|
!(this._url.includes('?') || this._url.includes('#'))
|
|
96
97
|
) {
|
|
97
|
-
this._url
|
|
98
|
+
const afterProtocol = this._url.split('://')[1];
|
|
99
|
+
if (afterProtocol && !afterProtocol.includes('/')) {
|
|
100
|
+
this._url += '/';
|
|
101
|
+
}
|
|
98
102
|
}
|
|
99
103
|
} else {
|
|
100
104
|
if (typeof base === 'string') {
|
|
@@ -170,6 +174,24 @@ export class URL {
|
|
|
170
174
|
return searchMatch ? `?${searchMatch[1]}` : '';
|
|
171
175
|
}
|
|
172
176
|
|
|
177
|
+
set search(value: string) {
|
|
178
|
+
// Remove leading '?' if present
|
|
179
|
+
const searchString = value.startsWith('?') ? value.slice(1) : value;
|
|
180
|
+
|
|
181
|
+
// Update the internal URL
|
|
182
|
+
const baseUrl = this._url.split('?')[0].split('#')[0];
|
|
183
|
+
const hash = this.hash;
|
|
184
|
+
|
|
185
|
+
if (searchString) {
|
|
186
|
+
this._url = baseUrl + '?' + searchString + hash;
|
|
187
|
+
} else {
|
|
188
|
+
this._url = baseUrl + hash;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Reset the searchParams instance so it gets recreated with new values
|
|
192
|
+
this._searchParamsInstance = null;
|
|
193
|
+
}
|
|
194
|
+
|
|
173
195
|
get searchParams(): URLSearchParams {
|
|
174
196
|
if (this._searchParamsInstance == null) {
|
|
175
197
|
this._searchParamsInstance = new URLSearchParams(this.search);
|
|
@@ -185,10 +207,19 @@ export class URL {
|
|
|
185
207
|
if (this._searchParamsInstance === null) {
|
|
186
208
|
return this._url;
|
|
187
209
|
}
|
|
210
|
+
|
|
211
|
+
// Remove existing search params and hash from the URL
|
|
212
|
+
const baseUrl = this._url.split('?')[0].split('#')[0];
|
|
213
|
+
const hash = this.hash;
|
|
214
|
+
|
|
188
215
|
// $FlowFixMe[incompatible-use]
|
|
189
216
|
const instanceString = this._searchParamsInstance.toString();
|
|
190
|
-
|
|
191
|
-
|
|
217
|
+
|
|
218
|
+
if (instanceString) {
|
|
219
|
+
return baseUrl + '?' + instanceString + hash;
|
|
220
|
+
} else {
|
|
221
|
+
return baseUrl + hash;
|
|
222
|
+
}
|
|
192
223
|
}
|
|
193
224
|
|
|
194
225
|
get username(): string {
|
|
@@ -150,12 +150,18 @@ export interface AccessibilityInfoStatic {
|
|
|
150
150
|
* - `announcement`: The string announced by the screen reader.
|
|
151
151
|
* - `options`: An object that configures the reading options.
|
|
152
152
|
* - `queue`: The announcement will be queued behind existing announcements. iOS only.
|
|
153
|
+
* - `priority`: The priority of the announcement. Possible values: 'low' | 'default' | 'high'.
|
|
154
|
+
* High priority announcements will interrupt any ongoing speech and cannot be interrupted.
|
|
155
|
+
* Default priority announcements will interrupt any ongoing speech but can be interrupted.
|
|
156
|
+
* Low priority announcements will not interrupt ongoing speech and can be interrupted.
|
|
157
|
+
* (iOS only).
|
|
153
158
|
* - `nativeID`: The nativeID of the element to send the announcement from. win32 only.
|
|
154
159
|
*/
|
|
155
160
|
announceForAccessibilityWithOptions(
|
|
156
161
|
announcement: string,
|
|
157
162
|
options: {
|
|
158
163
|
queue?: boolean | undefined;
|
|
164
|
+
priority?: 'low' | 'default' | 'high' | undefined;
|
|
159
165
|
nativeID?: string | undefined; // win32
|
|
160
166
|
},
|
|
161
167
|
): void;
|
|
@@ -476,10 +476,15 @@ const AccessibilityInfo = {
|
|
|
476
476
|
* - `announcement`: The string announced by the screen reader.
|
|
477
477
|
* - `options`: An object that configures the reading options.
|
|
478
478
|
* - `queue`: The announcement will be queued behind existing announcements. iOS only.
|
|
479
|
+
* - `priority`: The priority of the announcement. Possible values: 'low' | 'default' | 'high'.
|
|
480
|
+
* High priority announcements will interrupt any ongoing speech and cannot be interrupted.
|
|
481
|
+
* Default priority announcements will interrupt any ongoing speech but can be interrupted.
|
|
482
|
+
* Low priority announcements will not interrupt ongoing speech and can be interrupted.
|
|
483
|
+
* (iOS only).
|
|
479
484
|
*/
|
|
480
485
|
announceForAccessibilityWithOptions(
|
|
481
486
|
announcement: string,
|
|
482
|
-
options: {queue?: boolean},
|
|
487
|
+
options: {queue?: boolean, priority?: 'low' | 'default' | 'high'},
|
|
483
488
|
): void {
|
|
484
489
|
if (Platform.OS === 'android') {
|
|
485
490
|
NativeAccessibilityInfoAndroid?.announceForAccessibility(announcement);
|
|
@@ -502,12 +502,18 @@ const AccessibilityInfo = {
|
|
|
502
502
|
* - `announcement`: The string announced by the screen reader.
|
|
503
503
|
* - `options`: An object that configures the reading options.
|
|
504
504
|
* - `queue`: The announcement will be queued behind existing announcements. iOS only.
|
|
505
|
+
* - `priority`: The priority of the announcement. Possible values: 'low' | 'default' | 'high'.
|
|
506
|
+
* High priority announcements will interrupt any ongoing speech and cannot be interrupted.
|
|
507
|
+
* Default priority announcements will interrupt any ongoing speech but can be interrupted.
|
|
508
|
+
* Low priority announcements will not interrupt ongoing speech and can be interrupted.
|
|
509
|
+
* (iOS only).
|
|
505
510
|
* - `nativeID`: The nativeID of the element to send the announcement from. win32 only.
|
|
506
511
|
*/
|
|
507
512
|
announceForAccessibilityWithOptions(
|
|
508
513
|
announcement: string,
|
|
509
514
|
options: {
|
|
510
515
|
queue?: boolean,
|
|
516
|
+
priority?: 'low' | 'default' | 'high',
|
|
511
517
|
nativeID?: string, // win32
|
|
512
518
|
},
|
|
513
519
|
): void {
|
|
@@ -515,9 +521,10 @@ const AccessibilityInfo = {
|
|
|
515
521
|
NativeAccessibilityInfo?.announceForAccessibility(announcement);
|
|
516
522
|
} else if (Platform.OS === 'win32') {
|
|
517
523
|
if (NativeAccessibilityInfoWin32?.announceForAccessibilityWithOptions) {
|
|
524
|
+
const {priority: _, ...win32Options} = options;
|
|
518
525
|
NativeAccessibilityInfoWin32?.announceForAccessibilityWithOptions(
|
|
519
526
|
announcement,
|
|
520
|
-
|
|
527
|
+
win32Options,
|
|
521
528
|
);
|
|
522
529
|
} else {
|
|
523
530
|
NativeAccessibilityInfoWin32?.announceForAccessibility(announcement);
|
|
@@ -38,7 +38,7 @@ export type ButtonProps = $ReadOnly<{
|
|
|
38
38
|
Handler to be called when the user taps the button. The first function
|
|
39
39
|
argument is an event in form of [GestureResponderEvent](pressevent).
|
|
40
40
|
*/
|
|
41
|
-
onPress?: (event?: GestureResponderEvent) =>
|
|
41
|
+
onPress?: (event?: GestureResponderEvent) => unknown,
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
If `true`, doesn't play system sound on touch.
|
|
@@ -148,7 +148,7 @@ export type ButtonProps = $ReadOnly<{
|
|
|
148
148
|
*/
|
|
149
149
|
accessible?: ?boolean,
|
|
150
150
|
accessibilityActions?: ?$ReadOnlyArray<AccessibilityActionInfo>,
|
|
151
|
-
onAccessibilityAction?: ?(event: AccessibilityActionEvent) =>
|
|
151
|
+
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => unknown,
|
|
152
152
|
accessibilityState?: ?AccessibilityState,
|
|
153
153
|
|
|
154
154
|
/**
|
|
@@ -184,9 +184,6 @@ export type ButtonProps = $ReadOnly<{
|
|
|
184
184
|
[button:source]:
|
|
185
185
|
https://github.com/facebook/react-native/blob/HEAD/Libraries/Components/Button.js
|
|
186
186
|
|
|
187
|
-
[button:examples]:
|
|
188
|
-
https://js.coach/?menu%5Bcollections%5D=React%20Native&page=1&query=button
|
|
189
|
-
|
|
190
187
|
```jsx
|
|
191
188
|
<Button
|
|
192
189
|
onPress={onPressLearnMore}
|
|
@@ -39,7 +39,7 @@ export type ButtonProps = $ReadOnly<{
|
|
|
39
39
|
Handler to be called when the user taps the button. The first function
|
|
40
40
|
argument is an event in form of [GestureResponderEvent](pressevent).
|
|
41
41
|
*/
|
|
42
|
-
onPress?: (event?: GestureResponderEvent) =>
|
|
42
|
+
onPress?: (event?: GestureResponderEvent) => unknown,
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
If `true`, doesn't play system sound on touch.
|
|
@@ -149,7 +149,7 @@ export type ButtonProps = $ReadOnly<{
|
|
|
149
149
|
*/
|
|
150
150
|
accessible?: ?boolean,
|
|
151
151
|
accessibilityActions?: ?$ReadOnlyArray<AccessibilityActionInfo>,
|
|
152
|
-
onAccessibilityAction?: ?(event: AccessibilityActionEvent) =>
|
|
152
|
+
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => unknown,
|
|
153
153
|
accessibilityState?: ?AccessibilityState,
|
|
154
154
|
|
|
155
155
|
/**
|
|
@@ -187,9 +187,6 @@ export type ButtonProps = $ReadOnly<{
|
|
|
187
187
|
[button:source]:
|
|
188
188
|
https://github.com/facebook/react-native/blob/HEAD/Libraries/Components/Button.js
|
|
189
189
|
|
|
190
|
-
[button:examples]:
|
|
191
|
-
https://js.coach/?menu%5Bcollections%5D=React%20Native&page=1&query=button
|
|
192
|
-
|
|
193
190
|
```jsx
|
|
194
191
|
<Button
|
|
195
192
|
onPress={onPressLearnMore}
|
|
@@ -67,7 +67,7 @@ class DrawerLayoutAndroid
|
|
|
67
67
|
extends React.Component<DrawerLayoutAndroidProps, DrawerLayoutAndroidState>
|
|
68
68
|
implements DrawerLayoutAndroidMethods
|
|
69
69
|
{
|
|
70
|
-
static get positions():
|
|
70
|
+
static get positions(): unknown {
|
|
71
71
|
console.warn(
|
|
72
72
|
'Setting DrawerLayoutAndroid drawerPosition using `DrawerLayoutAndroid.positions` is deprecated. Instead pass the string value "left" or "right"',
|
|
73
73
|
);
|
|
@@ -73,7 +73,7 @@ export type DrawerLayoutAndroidProps = $ReadOnly<{
|
|
|
73
73
|
/**
|
|
74
74
|
* Function called whenever there is an interaction with the navigation view.
|
|
75
75
|
*/
|
|
76
|
-
onDrawerSlide?: ?(event: DrawerSlideEvent) =>
|
|
76
|
+
onDrawerSlide?: ?(event: DrawerSlideEvent) => unknown,
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* Function called when the drawer state has changed. The drawer can be in 3 states:
|
|
@@ -82,17 +82,17 @@ export type DrawerLayoutAndroidProps = $ReadOnly<{
|
|
|
82
82
|
* - Settling, meaning that there was an interaction with the navigation view, and the
|
|
83
83
|
* navigation view is now finishing its closing or opening animation
|
|
84
84
|
*/
|
|
85
|
-
onDrawerStateChanged?: ?(state: DrawerStates) =>
|
|
85
|
+
onDrawerStateChanged?: ?(state: DrawerStates) => unknown,
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Function called whenever the navigation view has been opened.
|
|
89
89
|
*/
|
|
90
|
-
onDrawerOpen?: ?() =>
|
|
90
|
+
onDrawerOpen?: ?() => unknown,
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Function called whenever the navigation view has been closed.
|
|
94
94
|
*/
|
|
95
|
-
onDrawerClose?: ?() =>
|
|
95
|
+
onDrawerClose?: ?() => unknown,
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* The navigation view that will be rendered to the side of the screen and can be pulled in.
|
|
@@ -148,8 +148,8 @@ class KeyboardImpl {
|
|
|
148
148
|
*/
|
|
149
149
|
addListener<K: $Keys<KeyboardEventDefinitions>>(
|
|
150
150
|
eventType: K,
|
|
151
|
-
listener: (...KeyboardEventDefinitions[K]) =>
|
|
152
|
-
context?:
|
|
151
|
+
listener: (...KeyboardEventDefinitions[K]) => unknown,
|
|
152
|
+
context?: unknown,
|
|
153
153
|
): EventSubscription {
|
|
154
154
|
return this._emitter.addListener(eventType, listener);
|
|
155
155
|
}
|