From d79acbe369997201ad62d746da503626d93ba77c Mon Sep 17 00:00:00 2001 From: Eli White Date: Fri, 18 Oct 2024 14:17:51 -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 4398919e77501b..6b3097804fa435 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;