mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
292a9904c4
commit
7c82a3fa11
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user