mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Land suppressions for 0.142.0 release to xplat
Summary: This change contains the suppressions for the up coming v0.142.0 Flow release. The new suppressions are a result the following changes: * Disallow flowing functions or inexact objects to indexed objects to improve object soundness. This can cause errors if you are passing a function or inexact objects when an indexed object is expected. * Flow now processes imports before checking the body of a file. In some rare cases this can expose previously skipped errors due to the processing order. Reviewed By: mroch Differential Revision: D25820434 fbshipit-source-id: 59cc1d852ffc8cc39f0d5112ce485fb33f05c092
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fa406ac2aa
commit
f2052fedc2
@@ -74,6 +74,7 @@ function attachNativeEvent(
|
||||
NativeAnimatedHelper.API.removeAnimatedEventFromView(
|
||||
viewTag,
|
||||
eventName,
|
||||
// $FlowFixMe[incompatible-call]
|
||||
mapping.animatedValueTag,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -716,7 +716,9 @@ describe('Pressability', () => {
|
||||
handlers.onResponderMove(
|
||||
createMockPressEvent({
|
||||
registrationName: 'onResponderMove',
|
||||
// $FlowFixMe[unsafe-addition]
|
||||
pageX: mockRegion.width + mockSlop.right / 2,
|
||||
// $FlowFixMe[unsafe-addition]
|
||||
pageY: mockRegion.height + mockSlop.bottom / 2,
|
||||
}),
|
||||
);
|
||||
@@ -750,7 +752,9 @@ describe('Pressability', () => {
|
||||
handlers.onResponderMove(
|
||||
createMockPressEvent({
|
||||
registrationName: 'onResponderMove',
|
||||
// $FlowFixMe[unsafe-addition]
|
||||
pageX: mockRegion.width + mockSlop.right / 2,
|
||||
// $FlowFixMe[unsafe-addition]
|
||||
pageY: mockRegion.height + mockSlop.bottom / 2,
|
||||
}),
|
||||
);
|
||||
@@ -870,9 +874,11 @@ describe('Pressability', () => {
|
||||
config.onStartShouldSetResponder_DEPRECATED,
|
||||
);
|
||||
|
||||
// $FlowFixMe[prop-missing]
|
||||
onStartShouldSetResponder_DEPRECATED.mockReturnValue(false);
|
||||
expect(handlers.onStartShouldSetResponder()).toBe(false);
|
||||
|
||||
// $FlowFixMe[prop-missing]
|
||||
onStartShouldSetResponder_DEPRECATED.mockReturnValue(true);
|
||||
expect(handlers.onStartShouldSetResponder()).toBe(true);
|
||||
});
|
||||
|
||||
@@ -55,9 +55,11 @@ export default function splitLayoutProps(
|
||||
case 'bottom':
|
||||
case 'top':
|
||||
case 'transform':
|
||||
// $FlowFixMe[cannot-write]
|
||||
outer[prop] = props[prop];
|
||||
break;
|
||||
default:
|
||||
// $FlowFixMe[cannot-write]
|
||||
inner[prop] = props[prop];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ type NativeTextProps = $ReadOnly<{
|
||||
export const NativeText: HostComponent<NativeTextProps> = (createReactNativeComponentClass(
|
||||
'RCTText',
|
||||
() => ({
|
||||
// $FlowFixMe[incompatible-call]
|
||||
validAttributes: {
|
||||
...ReactNativeViewAttributes.UIView,
|
||||
isHighlighted: true,
|
||||
@@ -60,6 +61,7 @@ export const NativeVirtualText: HostComponent<NativeTextProps> =
|
||||
UIManager.getViewManagerConfig('RCTVirtualText') == null
|
||||
? NativeText
|
||||
: (createReactNativeComponentClass('RCTVirtualText', () => ({
|
||||
// $FlowFixMe[incompatible-call]
|
||||
validAttributes: {
|
||||
...ReactNativeViewAttributes.UIView,
|
||||
isHighlighted: true,
|
||||
|
||||
Reference in New Issue
Block a user