Skip to content

Commit 92b62f5

Browse files
authored
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 ✅.
1 parent 79ddf5b commit 92b62f5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,10 @@ declare const ensureNativeMethodsAreSynced: NativeMethods;
132132
(ensureNativeMethodsAreSynced: INativeMethods);
133133

134134
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+
);
138139

139140
type InspectorDataProps = $ReadOnly<{
140141
[propName: string]: string,
@@ -205,9 +206,7 @@ export type ReactNativeType = {
205206
componentOrHandle: ?(ElementRef<TElementType> | number),
206207
): ?number,
207208
isChildPublicInstance(
208-
// eslint-disable-next-line no-undef
209209
parent: PublicInstance | HostComponent<empty>,
210-
// eslint-disable-next-line no-undef
211210
child: PublicInstance | HostComponent<empty>,
212211
): boolean,
213212
dispatchCommand(

0 commit comments

Comments
 (0)