From ba49a5a22c1e38f77dff90473cd0afa96ab5da56 Mon Sep 17 00:00:00 2001 From: Eli White Date: Fri, 18 Oct 2024 14:24:20 -0700 Subject: [PATCH] Support new codegen schema for native modules (#47114) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47114 Export the EventEmitter annotation from the codegen Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D63995813 --- packages/react-native-codegen/src/CodegenSchema.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native-codegen/src/CodegenSchema.js b/packages/react-native-codegen/src/CodegenSchema.js index 4398919e7750..6b3097804fa4 100644 --- a/packages/react-native-codegen/src/CodegenSchema.js +++ b/packages/react-native-codegen/src/CodegenSchema.js @@ -71,7 +71,7 @@ export type MixedTypeAnnotation = $ReadOnly<{ type: 'MixedTypeAnnotation', }>; -type EventEmitterTypeAnnotation = $ReadOnly<{ +export type EventEmitterTypeAnnotation = $ReadOnly<{ type: 'EventEmitterTypeAnnotation', typeAnnotation: NativeModuleEventEmitterTypeAnnotation | $FlowFixMe, }>; @@ -424,4 +424,5 @@ export type CompleteTypeAnnotation = | NativeModuleTypeAnnotation | NativeModuleFunctionTypeAnnotation | NullableTypeAnnotation + | EventEmitterTypeAnnotation | UnsafeAnyTypeAnnotation;