mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use hasteModuleName for C++ Turbo Module enums (#44631)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44631 Changelog: [General][Breaking] Use hasteModuleName for C++ Turbo Module enums This is a follow up to https://github.com/facebook/react-native/pull/44630 This changes the names of C++ Turbo Modules enums to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export enum EnumNone { NA, NB, } export interface Spec extends TurboModule { +getStrEnum: (arg: EnumNone) => EnumStr;t } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxEnumNone ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleEnumNone ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) Reviewed By: cipolleschi Differential Revision: D57602082 fbshipit-source-id: 9ebd68b8059dfbc6e2ec11065915cf049aa3cb0b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b98c5b960c
commit
b7fc5867f2
@@ -160,13 +160,13 @@ class NativeCxxModuleExample
|
||||
|
||||
GraphNode getGraphNode(jsi::Runtime& rt, GraphNode arg);
|
||||
|
||||
NativeCxxModuleExampleCxxEnumInt getNumEnum(
|
||||
NativeCxxModuleExampleEnumInt getNumEnum(
|
||||
jsi::Runtime& rt,
|
||||
NativeCxxModuleExampleCxxEnumInt arg);
|
||||
NativeCxxModuleExampleEnumInt arg);
|
||||
|
||||
NativeCxxModuleExampleCxxEnumStr getStrEnum(
|
||||
NativeCxxModuleExampleEnumStr getStrEnum(
|
||||
jsi::Runtime& rt,
|
||||
NativeCxxModuleExampleCxxEnumNone arg);
|
||||
NativeCxxModuleExampleEnumNone arg);
|
||||
|
||||
std::map<std::string, std::optional<int32_t>> getMap(
|
||||
jsi::Runtime& rt,
|
||||
|
||||
Reference in New Issue
Block a user