Add enum example to Android/iOS rn-tester TurboModule (#35133)

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

Add enum example to Android/iOS rn-tester TurboModule

Changelog:
[General][Added] - Add enum example to Android/iOS rn-tester TurboModule

Reviewed By: javache, cipolleschi

Differential Revision: D40711269

fbshipit-source-id: c8ad6fb7dee40b45b696660cc4d78921edafd8a1
This commit is contained in:
Christoph Purrer
2023-02-08 22:49:30 -08:00
committed by Facebook GitHub Bot
parent 292a9904c4
commit 7c82a3fa11
15 changed files with 85 additions and 0 deletions
@@ -13,6 +13,11 @@ import type {RootTag, TurboModule} from '../RCTExport';
import * as TurboModuleRegistry from '../TurboModuleRegistry';
export enum EnumInt {
A = 23,
B = 42,
}
export interface Spec extends TurboModule {
// Exported methods.
+getConstants: () => {|
@@ -22,6 +27,7 @@ export interface Spec extends TurboModule {
|};
+voidFunc: () => void;
+getBool: (arg: boolean) => boolean;
+getEnum?: (arg: EnumInt) => EnumInt;
+getNumber: (arg: number) => number;
+getString: (arg: string) => string;
+getArray: (arg: Array<any>) => Array<any>;