diff --git a/packages/react-native-codegen/src/CodegenSchema.js b/packages/react-native-codegen/src/CodegenSchema.js index a0c87b5e7db..4aec6a45332 100644 --- a/packages/react-native-codegen/src/CodegenSchema.js +++ b/packages/react-native-codegen/src/CodegenSchema.js @@ -153,14 +153,7 @@ export type PropTypeAnnotation = default: number, options: $ReadOnlyArray, |}> - | $ReadOnly<{| - type: 'ReservedPropTypeAnnotation', - name: - | 'ColorPrimitive' - | 'ImageSourcePrimitive' - | 'PointPrimitive' - | 'EdgeInsetsPrimitive', - |}> + | ReservedPropTypeAnnotation | ObjectTypeAnnotation | $ReadOnly<{| type: 'ArrayTypeAnnotation', @@ -176,20 +169,22 @@ export type PropTypeAnnotation = options: $ReadOnlyArray, |}> | ObjectTypeAnnotation - | $ReadOnly<{| - type: 'ReservedPropTypeAnnotation', - name: - | 'ColorPrimitive' - | 'ImageSourcePrimitive' - | 'PointPrimitive' - | 'EdgeInsetsPrimitive', - |}> + | ReservedPropTypeAnnotation | $ReadOnly<{| type: 'ArrayTypeAnnotation', elementType: ObjectTypeAnnotation, |}>, |}>; +type ReservedPropTypeAnnotation = $ReadOnly<{| + type: 'ReservedPropTypeAnnotation', + name: + | 'ColorPrimitive' + | 'ImageSourcePrimitive' + | 'PointPrimitive' + | 'EdgeInsetsPrimitive', +|}>; + export type CommandTypeAnnotation = FunctionTypeAnnotation< CommandParamTypeAnnotation, VoidTypeAnnotation,