Skip to content

Commit d3c6c16

Browse files
committed
Flow upgrade to 0.145
Fixed a RN library definition that defined `CustomEvent` as a reference to itself. ghstack-source-id: 90da2e3 Pull Request resolved: #25409
1 parent 00a2f81 commit d3c6c16

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"eslint-plugin-react-internal": "link:./scripts/eslint-rules",
6464
"fbjs-scripts": "1.2.0",
6565
"filesize": "^6.0.1",
66-
"flow-bin": "^0.143.0",
66+
"flow-bin": "^0.145.0",
6767
"glob": "^7.1.6",
6868
"glob-stream": "^6.1.0",
6969
"google-closure-compiler": "^20200517.0.0",

packages/react-native-renderer/src/ReactNativeGetListeners.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ export default function getListeners(
122122
detail: syntheticEvent.nativeEvent,
123123
});
124124
eventInst.isTrusted = true;
125-
// setSyntheticEvent is present on the React Native Event shim.
126-
// It is used to forward method calls on Event to the underlying SyntheticEvent.
127-
// $FlowFixMe
128125
eventInst.setSyntheticEvent(syntheticEvent);
129126

130127
listenerObj.listener(eventInst, ...args);

scripts/flow/config/flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ munge_underscores=false
5050
%REACT_RENDERER_FLOW_OPTIONS%
5151

5252
[version]
53-
^0.143.0
53+
^0.145.0

scripts/flow/react-native-host-hooks.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,18 @@ declare module 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface'
143143
emit: (channel: string, event: RawEventEmitterEvent) => string,
144144
...
145145
};
146-
declare export var CustomEvent: CustomEvent;
146+
declare export class CustomEvent {
147+
isTrusted: boolean;
148+
149+
constructor(
150+
name: string,
151+
{
152+
detail: any,
153+
},
154+
): void;
155+
156+
setSyntheticEvent(event: any): void;
157+
}
147158
}
148159

149160
declare module 'react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore' {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7911,10 +7911,10 @@ flatted@^2.0.0:
79117911
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
79127912
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
79137913

7914-
flow-bin@^0.143.0:
7915-
version "0.143.1"
7916-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.143.1.tgz#2ff825dfd85e84531b0ae780842cb1c2a9743cd2"
7917-
integrity sha512-6S6bgZ/pghBzEUELXkwFH/bsHT+GBMo8ftHDYs0SSJ+1e6NRdFfqxcYhaTvAK8zteSfQLZBIoec6G4WPPp4qQg==
7914+
flow-bin@^0.145.0:
7915+
version "0.145.0"
7916+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.145.0.tgz#922f7c3568caaa5eb64621ec536deb56b24d1795"
7917+
integrity sha512-+9fi9BMxRBtSWC1x0hWggWTb8Vih+AC7wyvLAX5wR1m6u2lF2HLtixXqy2GX8bWgaynSEJR5lmPxYYC4wMI8cA==
79187918

79197919
79207920
version "0.13.0"

0 commit comments

Comments
 (0)