Skip to content

Commit 9db1d13

Browse files
SamChou19815meta-codesync[bot]
authored andcommitted
Update to use modern casting syntax in codegen fixtures (#56258)
Summary: Pull Request resolved: #56258 According to my understanding, the codegen already outputs the modern casting syntax. Only these fixtures are stuck on the old syntax. This diff fixes them all. Changelog: [Internal] Reviewed By: gkz Differential Revision: D98537137 fbshipit-source-id: 0d4a19e8eeece771881ed793ec994da25297de50
1 parent d38c756 commit 9db1d13

55 files changed

Lines changed: 192 additions & 192 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/react-native-codegen/e2e/deep_imports/__test_fixtures__/components/ArrayPropsNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ type NativeProps = Readonly<{
4545
arrayOfMixed?: ReadonlyArray<UnsafeMixed>,
4646
}>;
4747

48-
export default (codegenNativeComponent<NativeProps>(
48+
export default codegenNativeComponent<NativeProps>(
4949
'ArrayPropsNativeComponentView',
50-
): HostComponent<NativeProps>);
50+
) as HostComponent<NativeProps>;

packages/react-native-codegen/e2e/deep_imports/__test_fixtures__/components/BooleanPropNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ type NativeProps = Readonly<{
2222
disabledNullable?: WithDefault<boolean, null>,
2323
}>;
2424

25-
export default (codegenNativeComponent<NativeProps>(
25+
export default codegenNativeComponent<NativeProps>(
2626
'BooleanPropNativeComponentView',
27-
): HostComponent<NativeProps>);
27+
) as HostComponent<NativeProps>;

packages/react-native-codegen/e2e/deep_imports/__test_fixtures__/components/ColorPropNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ type NativeProps = Readonly<{
2121
tintColor?: ColorValue,
2222
}>;
2323

24-
export default (codegenNativeComponent<NativeProps>(
24+
export default codegenNativeComponent<NativeProps>(
2525
'ColorPropNativeComponentView',
26-
): HostComponent<NativeProps>);
26+
) as HostComponent<NativeProps>;

packages/react-native-codegen/e2e/deep_imports/__test_fixtures__/components/DimensionPropNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ type NativeProps = Readonly<{
2121
marginBack?: DimensionValue,
2222
}>;
2323

24-
export default (codegenNativeComponent<NativeProps>(
24+
export default codegenNativeComponent<NativeProps>(
2525
'DimensionPropNativeComponentView',
26-
): HostComponent<NativeProps>);
26+
) as HostComponent<NativeProps>;

packages/react-native-codegen/e2e/deep_imports/__test_fixtures__/components/EdgeInsetsPropNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ type NativeProps = Readonly<{
2121
// contentInset?: EdgeInsetsValue,
2222
}>;
2323

24-
export default (codegenNativeComponent<NativeProps>(
24+
export default codegenNativeComponent<NativeProps>(
2525
'EdgeInsetsPropNativeComponentView',
26-
): HostComponent<NativeProps>);
26+
) as HostComponent<NativeProps>;

packages/react-native-codegen/e2e/deep_imports/__test_fixtures__/components/EnumPropNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ type NativeProps = Readonly<{
2222
intervals?: WithDefault<0 | 15 | 30 | 60, 0>,
2323
}>;
2424

25-
export default (codegenNativeComponent<NativeProps>(
25+
export default codegenNativeComponent<NativeProps>(
2626
'EnumPropNativeComponentView',
27-
): HostComponent<NativeProps>);
27+
) as HostComponent<NativeProps>;

packages/react-native-codegen/e2e/deep_imports/__test_fixtures__/components/EventNestedObjectPropsNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ type NativeProps = Readonly<{
3838
onChange?: ?BubblingEventHandler<OnChangeEvent>,
3939
}>;
4040

41-
export default (codegenNativeComponent<NativeProps>(
41+
export default codegenNativeComponent<NativeProps>(
4242
'EventNestedObjectPropsNativeComponentView',
43-
): HostComponent<NativeProps>);
43+
) as HostComponent<NativeProps>;

packages/react-native-codegen/e2e/deep_imports/__test_fixtures__/components/EventPropsNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ type NativeProps = Readonly<{
5959
>,
6060
}>;
6161

62-
export default (codegenNativeComponent<NativeProps>(
62+
export default codegenNativeComponent<NativeProps>(
6363
'EventPropsNativeComponentView',
64-
): HostComponent<NativeProps>);
64+
) as HostComponent<NativeProps>;

packages/react-native-codegen/e2e/deep_imports/__test_fixtures__/components/FloatPropsNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ type NativeProps = Readonly<{
3030
blurRadiusNullable?: WithDefault<Float, null>,
3131
}>;
3232

33-
export default (codegenNativeComponent<NativeProps>(
33+
export default codegenNativeComponent<NativeProps>(
3434
'FloatPropsNativeComponentView',
35-
): HostComponent<NativeProps>);
35+
) as HostComponent<NativeProps>;

packages/react-native-codegen/e2e/deep_imports/__test_fixtures__/components/ImagePropNativeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ type NativeProps = Readonly<{
2121
thumbImage?: ImageSource,
2222
}>;
2323

24-
export default (codegenNativeComponent<NativeProps>(
24+
export default codegenNativeComponent<NativeProps>(
2525
'ImagePropNativeComponentView',
26-
): HostComponent<NativeProps>);
26+
) as HostComponent<NativeProps>;

0 commit comments

Comments
 (0)