Skip to content

Commit

Permalink
Add a union of all the types (#46528)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #46528

This is needed for a script that needs to switch over all possible type annotations in the codegen schema.

Reviewed By: GijsWeterings

Differential Revision: D62805189

fbshipit-source-id: 8fd113f4ad0b695b38e92b8d0fc45a991f597fb8
  • Loading branch information
elicwhite authored and facebook-github-bot committed Sep 17, 2024
1 parent 785123b commit 6666df9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/react-native-codegen/src/CodegenSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,11 @@ type NativeModuleParamOnlyTypeAnnotation = NativeModuleFunctionTypeAnnotation;
type NativeModuleReturnOnlyTypeAnnotation =
| NativeModulePromiseTypeAnnotation
| VoidTypeAnnotation;

// 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 =
| NativeModuleTypeAnnotation
| NativeModuleFunctionTypeAnnotation
| NullableTypeAnnotation<NativeModuleTypeAnnotation>
| UnsafeAnyTypeAnnotation;

0 comments on commit 6666df9

Please sign in to comment.