diff --git a/packages/react-native-codegen/src/CodegenSchema.js b/packages/react-native-codegen/src/CodegenSchema.js index 14552f63f063be..6a7adb57e11bb8 100644 --- a/packages/react-native-codegen/src/CodegenSchema.js +++ b/packages/react-native-codegen/src/CodegenSchema.js @@ -412,6 +412,14 @@ type NativeModuleReturnOnlyTypeAnnotation = | NativeModulePromiseTypeAnnotation | VoidTypeAnnotation; +// Add the allowed component reserved types to the native module union +export type CompleteReservedTypeAnnotation = + | ReservedTypeAnnotation + | { + type: 'ReservedTypeAnnotation', + name: ReservedPropTypeAnnotation['name'], + }; + // Used by compatibility check which needs to handle all possible types // This will eventually also include the union of all view manager types export type CompleteTypeAnnotation = @@ -421,6 +429,7 @@ export type CompleteTypeAnnotation = | EventEmitterTypeAnnotation | NativeModuleEnumDeclarationWithMembers | UnsafeAnyTypeAnnotation + | CompleteReservedTypeAnnotation // Native Module event emitters and methods | ObjectTypeAnnotation< Nullable | EventEmitterTypeAnnotation,