Skip to content

Commit

Permalink
Remove comment syntax from ReactNativeTypes (#31457)
Browse files Browse the repository at this point in the history
# 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 ✅.

DiffTrain build for [92b62f5](92b62f5)
  • Loading branch information
hoxyq committed Dec 11, 2024
1 parent 2564c8f commit a7b82f0
Show file tree
Hide file tree
Showing 24 changed files with 91 additions and 92 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.0.0-native-fb-3b597c05-20241210
19.0.0-native-fb-92b62f50-20241211
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c00b1cc281f493ba19736147d01c055b>>
* @generated SignedSource<<cd52d08dbb995064e227a0a1594ab490>>
*/

"use strict";
Expand Down Expand Up @@ -420,5 +420,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8c27205b2f8cbb91fa759e037620c374>>
* @generated SignedSource<<4f797c436a93c9bbbf1c9ad706d13692>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8c27205b2f8cbb91fa759e037620c374>>
* @generated SignedSource<<4f797c436a93c9bbbf1c9ad706d13692>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b5df96adc780d5a9fa86082232105e97>>
* @generated SignedSource<<0704bd40d7756c46a01b0d14835fd4b9>>
*/

/*
Expand Down Expand Up @@ -25794,11 +25794,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-3b597c05-20241210" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-92b62f50-20241211" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-native-fb-3b597c05-20241210\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-native-fb-92b62f50-20241211\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25835,10 +25835,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-3b597c05-20241210",
version: "19.0.0-native-fb-92b62f50-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.0.0-native-fb-3b597c05-20241210"
reconcilerVersion: "19.0.0-native-fb-92b62f50-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -25982,5 +25982,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<49d657c95238fa14271d1926827f8c5c>>
* @generated SignedSource<<20f81694b6bc84c8849c39ffe3a34fca>>
*/

/*
Expand Down Expand Up @@ -15864,14 +15864,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1731 = React.version;
if (
"19.0.0-native-fb-3b597c05-20241210" !==
"19.0.0-native-fb-92b62f50-20241211" !==
isomorphicReactPackageVersion$jscomp$inline_1731
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1731,
"19.0.0-native-fb-3b597c05-20241210"
"19.0.0-native-fb-92b62f50-20241211"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15893,10 +15893,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2186 = {
bundleType: 0,
version: "19.0.0-native-fb-3b597c05-20241210",
version: "19.0.0-native-fb-92b62f50-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.0.0-native-fb-3b597c05-20241210"
reconcilerVersion: "19.0.0-native-fb-92b62f50-20241211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2187 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16000,4 +16000,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<3245d2c989e6aff0aef50cbd12023f91>>
* @generated SignedSource<<6553d62148aeca7c497b691d58c59605>>
*/

/*
Expand Down Expand Up @@ -16517,14 +16517,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1821 = React.version;
if (
"19.0.0-native-fb-3b597c05-20241210" !==
"19.0.0-native-fb-92b62f50-20241211" !==
isomorphicReactPackageVersion$jscomp$inline_1821
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1821,
"19.0.0-native-fb-3b597c05-20241210"
"19.0.0-native-fb-92b62f50-20241211"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16546,10 +16546,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1828 = {
bundleType: 0,
version: "19.0.0-native-fb-3b597c05-20241210",
version: "19.0.0-native-fb-92b62f50-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.0.0-native-fb-3b597c05-20241210",
reconcilerVersion: "19.0.0-native-fb-92b62f50-20241211",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$292 = 0;
Expand Down Expand Up @@ -16668,4 +16668,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<903e2cbe35e2d1e94df0b6acce1d1b8d>>
* @generated SignedSource<<0df2b3cd0b5ccd69e2a7fbc9fd181912>>
*/

/*
Expand Down Expand Up @@ -25855,11 +25855,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-3b597c05-20241210" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-92b62f50-20241211" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-native-fb-3b597c05-20241210\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-native-fb-92b62f50-20241211\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25896,10 +25896,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-3b597c05-20241210",
version: "19.0.0-native-fb-92b62f50-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.0.0-native-fb-3b597c05-20241210"
reconcilerVersion: "19.0.0-native-fb-92b62f50-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26359,7 +26359,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<49e7a1ac287e040371502ca905a4a9b3>>
* @generated SignedSource<<105810a96a762244a75e41d49eeb0f6a>>
*/

/*
Expand Down Expand Up @@ -15875,14 +15875,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1732 = React.version;
if (
"19.0.0-native-fb-3b597c05-20241210" !==
"19.0.0-native-fb-92b62f50-20241211" !==
isomorphicReactPackageVersion$jscomp$inline_1732
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1732,
"19.0.0-native-fb-3b597c05-20241210"
"19.0.0-native-fb-92b62f50-20241211"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15904,10 +15904,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2189 = {
bundleType: 0,
version: "19.0.0-native-fb-3b597c05-20241210",
version: "19.0.0-native-fb-92b62f50-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.0.0-native-fb-3b597c05-20241210"
reconcilerVersion: "19.0.0-native-fb-92b62f50-20241211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2190 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16165,4 +16165,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<53a1870db84718cd9b45e718d1beccde>>
* @generated SignedSource<<ecaf3219b6ec4c0a39f752e3945619e1>>
*/

/*
Expand Down Expand Up @@ -16532,14 +16532,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1822 = React.version;
if (
"19.0.0-native-fb-3b597c05-20241210" !==
"19.0.0-native-fb-92b62f50-20241211" !==
isomorphicReactPackageVersion$jscomp$inline_1822
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1822,
"19.0.0-native-fb-3b597c05-20241210"
"19.0.0-native-fb-92b62f50-20241211"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16561,10 +16561,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1829 = {
bundleType: 0,
version: "19.0.0-native-fb-3b597c05-20241210",
version: "19.0.0-native-fb-92b62f50-20241211",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.0.0-native-fb-3b597c05-20241210",
reconcilerVersion: "19.0.0-native-fb-92b62f50-20241211",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$292 = 0;
Expand Down Expand Up @@ -16837,7 +16837,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<4719b0b3fc7a219845f10de753a4dfa6>>
* @generated SignedSource<<395aece50bdd6d0db8a6e22e74856634>>
*/

"use strict";
Expand Down Expand Up @@ -15552,10 +15552,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-3b597c05-20241210",
version: "19.0.0-native-fb-92b62f50-20241211",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.0.0-native-fb-3b597c05-20241210"
reconcilerVersion: "19.0.0-native-fb-92b62f50-20241211"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -15700,5 +15700,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6d892c7b504a1466a14e91d7a628cbe1>>
* @generated SignedSource<<6ec12c381e3c99d2332db7a874263fcc>>
*/

"use strict";
Expand Down Expand Up @@ -9718,10 +9718,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1390 = {
bundleType: 0,
version: "19.0.0-native-fb-3b597c05-20241210",
version: "19.0.0-native-fb-92b62f50-20241211",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.0.0-native-fb-3b597c05-20241210"
reconcilerVersion: "19.0.0-native-fb-92b62f50-20241211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1391 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -9857,4 +9857,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.0.0-native-fb-3b597c05-20241210";
exports.version = "19.0.0-native-fb-92b62f50-20241211";
Loading

0 comments on commit a7b82f0

Please sign in to comment.