From 8d8a98d969b4e66a0bd28654c8b1e38f2de12ddb Mon Sep 17 00:00:00 2001 From: Marco Wang Date: Fri, 16 Jan 2026 15:16:03 -0800 Subject: [PATCH] Fix react-native-github/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/ Summary: codemoded Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D90895199 --- .../components/ArrayPropsNativeComponent.js | 30 +++++++++---------- .../components/BooleanPropNativeComponent.js | 2 +- .../components/ColorPropNativeComponent.js | 2 +- .../DimensionPropNativeComponent.js | 2 +- .../EdgeInsetsPropNativeComponent.js | 2 +- .../components/EnumPropNativeComponent.js | 2 +- .../EventNestedObjectPropsNativeComponent.js | 6 ++-- .../components/EventPropsNativeComponent.js | 8 ++--- .../components/FloatPropsNativeComponent.js | 2 +- .../components/ImagePropNativeComponent.js | 2 +- .../components/IntegerPropNativeComponent.js | 2 +- .../InterfaceOnlyNativeComponent.js | 4 +-- .../components/MixedPropNativeComponent.js | 2 +- .../MultiNativePropNativeComponent.js | 2 +- .../NoPropsNoEventsNativeComponent.js | 2 +- .../components/ObjectPropsNativeComponent.js | 10 +++---- .../components/PointPropNativeComponent.js | 2 +- .../components/StringPropNativeComponent.js | 2 +- 18 files changed, 42 insertions(+), 42 deletions(-) diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ArrayPropsNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ArrayPropsNativeComponent.js index 68eca9c492ace6..f6c113b2ffa288 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ArrayPropsNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ArrayPropsNativeComponent.js @@ -21,25 +21,25 @@ import type { import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props - names?: $ReadOnlyArray, - disableds?: $ReadOnlyArray, - progress?: $ReadOnlyArray, - radii?: $ReadOnlyArray, - colors?: $ReadOnlyArray, - srcs?: $ReadOnlyArray, - points?: $ReadOnlyArray, - edgeInsets?: $ReadOnlyArray, - dimensions?: $ReadOnlyArray, - sizes?: CodegenTypes.WithDefault<$ReadOnlyArray<'small' | 'large'>, 'small'>, - object?: $ReadOnlyArray<$ReadOnly<{prop: string}>>, - arrayOfObjects?: $ReadOnlyArray< - $ReadOnly<{prop1: CodegenTypes.Float, prop2: CodegenTypes.Int32}>, + names?: ReadonlyArray, + disableds?: ReadonlyArray, + progress?: ReadonlyArray, + radii?: ReadonlyArray, + colors?: ReadonlyArray, + srcs?: ReadonlyArray, + points?: ReadonlyArray, + edgeInsets?: ReadonlyArray, + dimensions?: ReadonlyArray, + sizes?: CodegenTypes.WithDefault, 'small'>, + object?: ReadonlyArray>, + arrayOfObjects?: ReadonlyArray< + Readonly<{prop1: CodegenTypes.Float, prop2: CodegenTypes.Int32}>, >, - arrayOfMixed?: $ReadOnlyArray, + arrayOfMixed?: ReadonlyArray, }>; export default (codegenNativeComponent( diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/BooleanPropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/BooleanPropNativeComponent.js index 79671f00f2d2fd..9d76b677f368d4 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/BooleanPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/BooleanPropNativeComponent.js @@ -12,7 +12,7 @@ import type {CodegenTypes, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ColorPropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ColorPropNativeComponent.js index bbf5cbc3cdc17f..fefa660043d2f7 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ColorPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ColorPropNativeComponent.js @@ -12,7 +12,7 @@ import type {ColorValue, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/DimensionPropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/DimensionPropNativeComponent.js index 16173046661a5b..d57c51e936ec40 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/DimensionPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/DimensionPropNativeComponent.js @@ -12,7 +12,7 @@ import type {DimensionValue, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EdgeInsetsPropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EdgeInsetsPropNativeComponent.js index 1b2b386c2a9cb2..237d96694d67ad 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EdgeInsetsPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EdgeInsetsPropNativeComponent.js @@ -12,7 +12,7 @@ import type {HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EnumPropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EnumPropNativeComponent.js index 27afa233e7c852..c816ec04284223 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EnumPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EnumPropNativeComponent.js @@ -12,7 +12,7 @@ import type {CodegenTypes, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EventNestedObjectPropsNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EventNestedObjectPropsNativeComponent.js index 35f1479832c403..15c1c2325daf35 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EventNestedObjectPropsNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EventNestedObjectPropsNativeComponent.js @@ -12,17 +12,17 @@ import type {CodegenTypes, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type OnChangeEvent = $ReadOnly<{ +type OnChangeEvent = Readonly<{ location: { source: {url: string, ...}, x: CodegenTypes.Int32, y: CodegenTypes.Int32, - arrayOfObjects: $ReadOnlyArray<{value: $ReadOnly<{str: string}>}>, + arrayOfObjects: ReadonlyArray<{value: Readonly<{str: string}>}>, ... }, }>; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EventPropsNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EventPropsNativeComponent.js index 73638336c376e3..e9a3c9aca94350 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EventPropsNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/EventPropsNativeComponent.js @@ -12,22 +12,22 @@ import type {CodegenTypes, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type OnChangeEvent = $ReadOnly<{ +type OnChangeEvent = Readonly<{ value: boolean, source?: string, progress: ?CodegenTypes.Int32, scale?: ?CodegenTypes.Float, }>; -type OnEventDirect = $ReadOnly<{ +type OnEventDirect = Readonly<{ value: boolean, }>; -type OnOrientationChangeEvent = $ReadOnly<{ +type OnOrientationChangeEvent = Readonly<{ orientation: 'landscape' | 'portrait', }>; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/FloatPropsNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/FloatPropsNativeComponent.js index fc6563d1185dce..3d7d4482a1c8d1 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/FloatPropsNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/FloatPropsNativeComponent.js @@ -12,7 +12,7 @@ import type {CodegenTypes, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ImagePropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ImagePropNativeComponent.js index 4c7c9d69591c20..16265adbb06bac 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ImagePropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ImagePropNativeComponent.js @@ -12,7 +12,7 @@ import type {HostComponent, ImageSource, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/IntegerPropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/IntegerPropNativeComponent.js index 72b1f90cbd7010..f42eaffd91383e 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/IntegerPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/IntegerPropNativeComponent.js @@ -12,7 +12,7 @@ import type {CodegenTypes, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/InterfaceOnlyNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/InterfaceOnlyNativeComponent.js index 267107828ae2b9..ca002d616afa1b 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/InterfaceOnlyNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/InterfaceOnlyNativeComponent.js @@ -12,14 +12,14 @@ import type {CodegenTypes, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props title?: CodegenTypes.WithDefault, // Events - onChange?: ?CodegenTypes.BubblingEventHandler<$ReadOnly<{value: boolean}>>, + onChange?: ?CodegenTypes.BubblingEventHandler>, }>; export default (codegenNativeComponent( diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/MixedPropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/MixedPropNativeComponent.js index 1b7e3feec451ad..91813f558df77a 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/MixedPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/MixedPropNativeComponent.js @@ -12,7 +12,7 @@ import type {CodegenTypes, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/MultiNativePropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/MultiNativePropNativeComponent.js index b2d20ec08552b5..2e0b081f5f9e97 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/MultiNativePropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/MultiNativePropNativeComponent.js @@ -18,7 +18,7 @@ import type { import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/NoPropsNoEventsNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/NoPropsNoEventsNativeComponent.js index 99b4497f3a6827..2c7f932a77107e 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/NoPropsNoEventsNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/NoPropsNoEventsNativeComponent.js @@ -12,7 +12,7 @@ import type {HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // No Props or events diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ObjectPropsNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ObjectPropsNativeComponent.js index bc97448cd63a3d..47f9852d5c02a7 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ObjectPropsNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/ObjectPropsNativeComponent.js @@ -19,15 +19,15 @@ import type { import {codegenNativeComponent} from 'react-native'; -type ObjectArrayPropType = $ReadOnly<{ - array: $ReadOnlyArray, +type ObjectArrayPropType = Readonly<{ + array: ReadonlyArray, }>; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props - objectProp?: $ReadOnly<{ + objectProp?: Readonly<{ stringProp?: CodegenTypes.WithDefault, booleanProp: boolean, floatProp: CodegenTypes.Float, @@ -36,7 +36,7 @@ type NativeProps = $ReadOnly<{ intEnumProp?: CodegenTypes.WithDefault<0 | 1, 0>, }>, objectArrayProp: ObjectArrayPropType, - objectPrimitiveRequiredProp: $ReadOnly<{ + objectPrimitiveRequiredProp: Readonly<{ image: ImageSource, color?: ColorValue, point: ?PointValue, diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/PointPropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/PointPropNativeComponent.js index 76141ed1f30a19..0a8428210877d9 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/PointPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/PointPropNativeComponent.js @@ -12,7 +12,7 @@ import type {HostComponent, PointValue, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props diff --git a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/StringPropNativeComponent.js b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/StringPropNativeComponent.js index 90da9c6ceec36a..c79202bf412aea 100644 --- a/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/StringPropNativeComponent.js +++ b/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/components/StringPropNativeComponent.js @@ -12,7 +12,7 @@ import type {CodegenTypes, HostComponent, ViewProps} from 'react-native'; import {codegenNativeComponent} from 'react-native'; -type NativeProps = $ReadOnly<{ +type NativeProps = Readonly<{ ...ViewProps, // Props