mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Migrate rn-tester codegen types imports to use root exported CodegenTypes namespace (#50976)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50976 This is the second part of the migration of `rn-tester` package to use root imports. In this diff the `CodegenTypes` namespace is used to define Codegen primitives. Changelog: [Internal] Reviewed By: huntie Differential Revision: D73780584 fbshipit-source-id: c13c2dfcfa4d023978a9463af1d2a3bf7b72476c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9666a68977
commit
7959a63a1a
@@ -8,8 +8,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {TurboModule} from 'react-native';
|
||||
import type {EventEmitter} from 'react-native/Libraries/Types/CodegenTypes';
|
||||
import type {CodegenTypes, TurboModule} from 'react-native';
|
||||
|
||||
import {TurboModuleRegistry} from 'react-native';
|
||||
|
||||
@@ -77,11 +76,11 @@ export type CustomDeviceEvent = {
|
||||
};
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
+onPress: EventEmitter<void>;
|
||||
+onClick: EventEmitter<string>;
|
||||
+onChange: EventEmitter<ObjectStruct>;
|
||||
+onSubmit: EventEmitter<ObjectStruct[]>;
|
||||
+onEvent: EventEmitter<EnumNone>;
|
||||
+onPress: CodegenTypes.EventEmitter<void>;
|
||||
+onClick: CodegenTypes.EventEmitter<string>;
|
||||
+onChange: CodegenTypes.EventEmitter<ObjectStruct>;
|
||||
+onSubmit: CodegenTypes.EventEmitter<ObjectStruct[]>;
|
||||
+onEvent: CodegenTypes.EventEmitter<EnumNone>;
|
||||
+getArray: (arg: Array<ObjectStruct | null>) => Array<ObjectStruct | null>;
|
||||
+getBool: (arg: boolean) => boolean;
|
||||
+getConstants: () => ConstantsStruct;
|
||||
|
||||
Reference in New Issue
Block a user