@samitouri / QOS-React-2 / commits / 92b62f500c

Remove comment syntax from ReactNativeTypes (#31457)

# Summary I'm working to get the main `react-native` package parsable by modern Flow tooling (both `flow-bundler`, `flow-api-translator`). This diff trivially removes some redundant Flow comment syntax in `ReactNativeTypes.js`, which fixes parsing under these newer tools. ## How did you test this change? Files were pasted into `react-native-github` under fbsource, where Flow validates ✅.

Alex Hunt committed Dec 11, 2024 at 16:55 UTC 92b62f500c3fca44a9dc9ead936ef3bf19481f02
1 file changed +4 -5
packages/react-native-renderer/src/ReactNativeTypes.js
+4 -5
@@ -132,9 +132,10 @@ declare const ensureNativeMethodsAreSynced: NativeMethods;
132 (ensureNativeMethodsAreSynced: INativeMethods);
133
134 export type HostInstance = NativeMethods;
135 -/*::
136 -export type HostComponent<Config: {...}> = component(ref: React$RefSetter<HostInstance>, ...Config);
137 -*/
135 +export type HostComponent<Config: {...}> = component(
136 + ref: React$RefSetter<HostInstance>,
137 + ...Config
138 +);
139
140 type InspectorDataProps = $ReadOnly<{
141 [propName: string]: string,
@@ -205,9 +206,7 @@ export type ReactNativeType = {
206 componentOrHandle: ?(ElementRef<TElementType> | number),
207 ): ?number,
208 isChildPublicInstance(
208 - // eslint-disable-next-line no-undef
209 parent: PublicInstance | HostComponent<empty>,
210 - // eslint-disable-next-line no-undef
210 child: PublicInstance | HostComponent<empty>,
211 ): boolean,
212 dispatchCommand(