react-native code-gen > C++ TurboModules enum example (#36083)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36083

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D43036612

fbshipit-source-id: fc70650bc4ba48d11f489556d1290ae9e7e58016
This commit is contained in:
Christoph Purrer
2023-02-08 20:24:28 -08:00
committed by Facebook GitHub Bot
parent 2e3f55aced
commit 292a9904c4
9 changed files with 53 additions and 10 deletions
@@ -20,7 +20,9 @@ import {
RootTagContext,
} from 'react-native';
import * as React from 'react';
import NativeCxxModuleExample /*EnumInt,*/ from '../../../NativeCxxModuleExample/NativeCxxModuleExample';
import NativeCxxModuleExample, {
EnumInt,
} from '../../../NativeCxxModuleExample/NativeCxxModuleExample';
type State = {|
testResults: {
@@ -72,7 +74,7 @@ class NativeCxxModuleExampleExample extends React.Component<{||}, State> {
]),
getBool: () => NativeCxxModuleExample?.getBool(true),
getConstants: () => NativeCxxModuleExample?.getConstants(),
getEnum: () => NativeCxxModuleExample?.getEnum(/*EnumInt.A*/ 2),
getEnum: () => NativeCxxModuleExample?.getEnum(EnumInt.A),
getMap: () => NativeCxxModuleExample?.getMap({a: 1, b: null, c: 3}),
getNumber: () => NativeCxxModuleExample?.getNumber(99.95),
getObject: () =>