mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add more test coverage for $ReadOnlyArray<UnsafeMixed> in component codegen (#49349)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49349 Follow-up on D69454101 to add more test coverage for `$ReadOnlyArray<UnsafeMixed>` as a component prop. The new type was missing from the CodegenSchema, which revealed some gaps in tests. Changelog: [Internal] Reviewed By: fabriziocucci Differential Revision: D69488035 fbshipit-source-id: 19895e55e5ec4d89a790f1c388de9eea025a316c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
96a8a3da48
commit
9073817925
Vendored
+1
@@ -80,6 +80,7 @@ export type PojoTypeAnnotation =
|
||||
| DoubleTypeAnnotation
|
||||
| FloatTypeAnnotation
|
||||
| Int32TypeAnnotation
|
||||
| MixedTypeAnnotation
|
||||
| $ReadOnly<{
|
||||
type: 'StringEnumTypeAnnotation',
|
||||
default: string,
|
||||
|
||||
Vendored
+5
-1
@@ -148,6 +148,10 @@ function toJavaType(
|
||||
case 'Int32TypeAnnotation': {
|
||||
return 'Integer';
|
||||
}
|
||||
case 'MixedTypeAnnotation': {
|
||||
importDynamic();
|
||||
return 'Dynamic';
|
||||
}
|
||||
|
||||
/**
|
||||
* Enums
|
||||
@@ -214,7 +218,7 @@ function toJavaType(
|
||||
default: {
|
||||
(elementType.type: empty);
|
||||
throw new Error(
|
||||
`Unrecognized PojoTypeAnnotation Array element type annotation '${typeAnnotation.type}'`,
|
||||
`Unrecognized PojoTypeAnnotation Array element type annotation '${elementType.type}'`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user