manually fix a few more files (#56983)

Summary:
X-link: https://github.com/facebook/metro/pull/1719

Pull Request resolved: https://github.com/facebook/react-native/pull/56983

X-link: https://github.com/facebook/relay/pull/5300

skipped by codemod. Fixing them manually

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D106557702

fbshipit-source-id: 9228e5f8f855a362f72249117770d33d97bd4191
This commit is contained in:
Marco Wang authored and meta-codesync[bot] committed 2026-05-28 17:37:32 -07:00
1 parent eaf770433a
commit 88857d22f9
6 files changed
+19 -19

No files matched your search

+10 -10
View File
@@ -14,16 +14,16 @@
export type AssetDestPathResolver = 'android' | 'generic';
export type PackagerAsset = {
+__packager_asset: boolean,
+fileSystemLocation: string,
+httpServerLocation: string,
+width: ?number,
+height: ?number,
+scales: Array<number>,
+hash: string,
+name: string,
+type: string,
+resolver?: AssetDestPathResolver,
readonly __packager_asset: boolean,
readonly fileSystemLocation: string,
readonly httpServerLocation: string,
readonly width: ?number,
readonly height: ?number,
readonly scales: Array<number>,
readonly hash: string,
readonly name: string,
readonly type: string,
readonly resolver?: AssetDestPathResolver,
...
};
*/
@@ -162,5 +162,5 @@ export type DeepReadOnly<T> =
T extends ReadonlyArray<infer V>
? ReadonlyArray<DeepReadOnly<V>>
: T extends {...}
? {+[K in keyof T]: DeepReadOnly<T[K]>}
? {readonly [K in keyof T]: DeepReadOnly<T[K]>}
: T;
@@ -51,7 +51,7 @@ export type WithAnimatedValue<out T> = T extends Builtin | Nullable
: T extends ReadonlyArray<infer P>
? ReadonlyArray<WithAnimatedValue<P>>
: T extends {...}
? {+[K in keyof T]: WithAnimatedValue<T[K]>}
? {readonly [K in keyof T]: WithAnimatedValue<T[K]>}
: T;
type NonAnimatedProps =
+2 -2
View File
@@ -133,8 +133,8 @@ type HermesEngineSourceType =
*/
const HermesEngineSourceTypes /*:{
+DOWNLOAD_PREBUILD_TARBALL: "download_prebuild_tarball",
+LOCAL_PREBUILT_TARBALL: "local_prebuilt_tarball"
readonly DOWNLOAD_PREBUILD_TARBALL: "download_prebuild_tarball",
readonly LOCAL_PREBUILT_TARBALL: "local_prebuilt_tarball"
} */ = {
LOCAL_PREBUILT_TARBALL: 'local_prebuilt_tarball',
DOWNLOAD_PREBUILD_TARBALL: 'download_prebuild_tarball',
@@ -124,8 +124,8 @@ type ReactNativeDependenciesEngineSourceType =
*/
const ReactNativeDependenciesEngineSourceTypes /*: {
+DOWNLOAD_PREBUILD_TARBALL: "download_prebuild_tarball",
+DOWNLOAD_PREBUILT_NIGHTLY_TARBALL: "download_prebuilt_nightly_tarball"
readonly DOWNLOAD_PREBUILD_TARBALL: "download_prebuild_tarball",
readonly DOWNLOAD_PREBUILT_NIGHTLY_TARBALL: "download_prebuilt_nightly_tarball"
} */ = {
DOWNLOAD_PREBUILD_TARBALL: 'download_prebuild_tarball',
DOWNLOAD_PREBUILT_NIGHTLY_TARBALL: 'download_prebuilt_nightly_tarball',
+3 -3
View File
@@ -27,7 +27,7 @@ type BundlerOptions = {
config?: string,
// Typically index.{ios,android}.js
entryFile: string,
+platform: 'ios' | 'android' | string,
readonly platform: 'ios' | 'android' | string,
dev: boolean,
// Metro built main bundle
outputJsBundle: string,
@@ -58,12 +58,12 @@ type HermesConfig = {
};
type BundlerWatch = {
+mode: 'watch',
readonly mode: 'watch',
callback?: (metro: ExecaPromise) => void,
};
type BundlerBuild = {
+mode: 'bundle',
readonly mode: 'bundle',
};
type Bundler = BundlerWatch | BundlerBuild;