Use public imports in Codegen fixtures (#58572)

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

Migrate Codegen and compatibility fixtures from React Native deep imports to the public `react-native` entry point. Reference codegen-only types through the exported `CodegenTypes` namespace.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D120537584

fbshipit-source-id: f97ee85fb5f16d23a998d25c1544134ee08bc3cc
This commit is contained in:
Rubén Norte authored and meta-codesync[bot] committed 2026-09-18 07:27:28 -07:00
1 parent 652d50111c
commit ffbca04c3e
102 files changed
+474 -607

No files matched your search

@@ -8,23 +8,18 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {ImageSource} from 'react-native/Libraries/Image/ImageSource';
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
import type {
CodegenTypes,
ColorValue,
DimensionValue,
EdgeInsetsValue,
HostComponent,
ImageSource,
PointValue,
} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
import type {
Float,
Int32,
UnsafeMixed,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
ViewProps,
} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -32,17 +27,19 @@ type NativeProps = Readonly<{
// Props
names?: ReadonlyArray<string>,
disableds?: ReadonlyArray<boolean>,
progress?: ReadonlyArray<Int32>,
radii?: ReadonlyArray<Float>,
progress?: ReadonlyArray<CodegenTypes.Int32>,
radii?: ReadonlyArray<CodegenTypes.Float>,
colors?: ReadonlyArray<ColorValue>,
srcs?: ReadonlyArray<ImageSource>,
points?: ReadonlyArray<PointValue>,
edgeInsets?: ReadonlyArray<EdgeInsetsValue>,
dimensions?: ReadonlyArray<DimensionValue>,
sizes?: WithDefault<ReadonlyArray<'small' | 'large'>, 'small'>,
sizes?: CodegenTypes.WithDefault<ReadonlyArray<'small' | 'large'>, 'small'>,
object?: ReadonlyArray<Readonly<{prop: string}>>,
arrayOfObjects?: ReadonlyArray<Readonly<{prop1: Float, prop2: Int32}>>,
arrayOfMixed?: ReadonlyArray<UnsafeMixed>,
arrayOfObjects?: ReadonlyArray<
Readonly<{prop1: CodegenTypes.Float, prop2: CodegenTypes.Int32}>,
>,
arrayOfMixed?: ReadonlyArray<CodegenTypes.UnsafeMixed>,
}>;
export default codegenNativeComponent<NativeProps>(
@@ -8,18 +8,16 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
// Props
disabled?: WithDefault<boolean, false>,
disabledNullable?: WithDefault<boolean, null>,
disabled?: CodegenTypes.WithDefault<boolean, false>,
disabledNullable?: CodegenTypes.WithDefault<boolean, null>,
}>;
export default codegenNativeComponent<NativeProps>(
@@ -8,11 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
import type {ColorValue, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -8,11 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {DimensionValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
import type {DimensionValue, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -8,10 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -8,18 +8,19 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
// Props
alignment?: WithDefault<'top' | 'center' | 'bottom-right', 'center'>,
intervals?: WithDefault<0 | 15 | 30 | 60, 0>,
alignment?: CodegenTypes.WithDefault<
'top' | 'center' | 'bottom-right',
'center',
>,
intervals?: CodegenTypes.WithDefault<0 | 15 | 30 | 60, 0>,
}>;
export default codegenNativeComponent<NativeProps>(
@@ -8,21 +8,15 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
BubblingEventHandler,
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type OnChangeEvent = Readonly<{
location: {
source: {url: string, ...},
x: Int32,
y: Int32,
x: CodegenTypes.Int32,
y: CodegenTypes.Int32,
arrayOfObjects: ReadonlyArray<{value: Readonly<{str: string}>}>,
...
},
@@ -32,10 +26,10 @@ type NativeProps = Readonly<{
...ViewProps,
// Props
disabled?: WithDefault<boolean, false>,
disabled?: CodegenTypes.WithDefault<boolean, false>,
// Events
onChange?: ?BubblingEventHandler<OnChangeEvent>,
onChange?: ?CodegenTypes.BubblingEventHandler<OnChangeEvent>,
}>;
export default codegenNativeComponent<NativeProps>(
@@ -8,23 +8,15 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
BubblingEventHandler,
DirectEventHandler,
Float,
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type OnChangeEvent = Readonly<{
value: boolean,
source?: string,
progress: ?Int32,
scale?: ?Float,
progress: ?CodegenTypes.Int32,
scale?: ?CodegenTypes.Float,
}>;
type OnEventDirect = Readonly<{
@@ -39,21 +31,24 @@ type NativeProps = Readonly<{
...ViewProps,
// Props
disabled?: WithDefault<boolean, false>,
disabled?: CodegenTypes.WithDefault<boolean, false>,
// Events
onChange?: ?BubblingEventHandler<OnChangeEvent, 'paperDirectName'>,
onEventDirect?: ?DirectEventHandler<OnEventDirect>,
onEventDirectWithPaperName?: ?DirectEventHandler<
onChange?: ?CodegenTypes.BubblingEventHandler<
OnChangeEvent,
'paperDirectName',
>,
onEventDirect?: ?CodegenTypes.DirectEventHandler<OnEventDirect>,
onEventDirectWithPaperName?: ?CodegenTypes.DirectEventHandler<
OnEventDirect,
'paperDirectName',
>,
onOrientationChange?: ?DirectEventHandler<
onOrientationChange?: ?CodegenTypes.DirectEventHandler<
OnOrientationChangeEvent,
'paperBubblingName',
>,
onEnd?: ?BubblingEventHandler<null>,
onEventBubblingWithPaperName?: ?BubblingEventHandler<
onEnd?: ?CodegenTypes.BubblingEventHandler<null>,
onEventBubblingWithPaperName?: ?CodegenTypes.BubblingEventHandler<
null,
'paperBubblingName',
>,
@@ -8,26 +8,21 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Float,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
// Props
blurRadius: Float,
blurRadius2?: WithDefault<Float, 0.001>,
blurRadius3?: WithDefault<Float, 2.1>,
blurRadius4?: WithDefault<Float, 0>,
blurRadius5?: WithDefault<Float, 1>,
blurRadius6?: WithDefault<Float, -0.0>,
blurRadiusNullable?: WithDefault<Float, null>,
blurRadius: CodegenTypes.Float,
blurRadius2?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.001>,
blurRadius3?: CodegenTypes.WithDefault<CodegenTypes.Float, 2.1>,
blurRadius4?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>,
blurRadius5?: CodegenTypes.WithDefault<CodegenTypes.Float, 1>,
blurRadius6?: CodegenTypes.WithDefault<CodegenTypes.Float, -0.0>,
blurRadiusNullable?: CodegenTypes.WithDefault<CodegenTypes.Float, null>,
}>;
export default codegenNativeComponent<NativeProps>(
@@ -8,11 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {ImageSource} from 'react-native/Libraries/Image/ImageSource';
import type {HostComponent, ImageSource, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -8,22 +8,17 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
// Props
progress1?: WithDefault<Int32, 0>,
progress2?: WithDefault<Int32, -1>,
progress3?: WithDefault<Int32, 10>,
progress1?: CodegenTypes.WithDefault<CodegenTypes.Int32, 0>,
progress2?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>,
progress3?: CodegenTypes.WithDefault<CodegenTypes.Int32, 10>,
}>;
export default codegenNativeComponent<NativeProps>(
@@ -8,23 +8,18 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
BubblingEventHandler,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
// Props
title?: WithDefault<string, ''>,
title?: CodegenTypes.WithDefault<string, ''>,
// Events
onChange?: ?BubblingEventHandler<Readonly<{value: boolean}>>,
onChange?: ?CodegenTypes.BubblingEventHandler<Readonly<{value: boolean}>>,
}>;
export default codegenNativeComponent<NativeProps>(
@@ -8,17 +8,15 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {UnsafeMixed} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
// Props
mixedProp?: UnsafeMixed,
mixedProp?: CodegenTypes.UnsafeMixed,
}>;
export default codegenNativeComponent<NativeProps>(
@@ -8,13 +8,15 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {ImageSource} from 'react-native/Libraries/Image/ImageSource';
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
import type {PointValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
import type {
ColorValue,
HostComponent,
ImageSource,
PointValue,
ViewProps,
} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -8,10 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -8,18 +8,16 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {ImageSource} from 'react-native/Libraries/Image/ImageSource';
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
import type {PointValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
import type {
Float,
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
CodegenTypes,
ColorValue,
HostComponent,
ImageSource,
PointValue,
ViewProps,
} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type ObjectArrayPropType = Readonly<{
array: ReadonlyArray<string>,
@@ -30,12 +28,12 @@ type NativeProps = Readonly<{
// Props
objectProp?: Readonly<{
stringProp?: WithDefault<string, ''>,
stringProp?: CodegenTypes.WithDefault<string, ''>,
booleanProp: boolean,
floatProp: Float,
intProp: Int32,
stringEnumProp?: WithDefault<'small' | 'large', 'small'>,
intEnumProp?: WithDefault<0 | 1, 0>,
floatProp: CodegenTypes.Float,
intProp: CodegenTypes.Int32,
stringEnumProp?: CodegenTypes.WithDefault<'small' | 'large', 'small'>,
intEnumProp?: CodegenTypes.WithDefault<0 | 1, 0>,
}>,
objectArrayProp: ObjectArrayPropType,
objectPrimitiveRequiredProp: Readonly<{
@@ -8,11 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {PointValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
import type {HostComponent, PointValue, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -8,17 +8,15 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
// Props
placeholder?: WithDefault<string, ''>,
placeholder?: CodegenTypes.WithDefault<string, ''>,
defaultValue?: string,
}>;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type ArrayType = string;
type AnotherArray = Array<ArrayType>;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type Boolean = boolean;
type AnotherBoolean = Boolean;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type String = string;
type CB = (value: String) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type StateType = {
state: string,
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getBool: (a: ?boolean) => ?boolean;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type Number = number;
type AnotherNumber = Number;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type GenericObject = Object;
type AnotherGenericObject = GenericObject;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getConstants: () => {
@@ -10,9 +10,9 @@
'use strict';
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type SomeObj = {
a: string,
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type String = string;
type AnotherPromise = Promise<String>;
@@ -8,12 +8,9 @@
* @format
*/
import type {
RootTag,
TurboModule,
} from 'react-native/Libraries/TurboModule/RCTExport';
import type {RootTag, TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type Animal = {
name: string,
@@ -8,12 +8,9 @@
* @format
*/
import type {
RootTag,
TurboModule,
} from 'react-native/Libraries/TurboModule/RCTExport';
import type {RootTag, TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type Animal = {
name: string,
@@ -8,12 +8,9 @@
* @format
*/
import type {
RootTag,
TurboModule,
} from 'react-native/Libraries/TurboModule/RCTExport';
import type {RootTag, TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type Animal = ?{
name: ?string,
@@ -8,12 +8,9 @@
* @format
*/
import type {
RootTag,
TurboModule,
} from 'react-native/Libraries/TurboModule/RCTExport';
import type {RootTag, TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type Animal = ?{
name?: ?string,
@@ -8,12 +8,9 @@
* @format
*/
import type {
RootTag,
TurboModule,
} from 'react-native/Libraries/TurboModule/RCTExport';
import type {RootTag, TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type Animal = {
name?: string,
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type String = string;
type AnotherString = String;
@@ -234,11 +234,11 @@ const NATIVE_MODULE_WITH_FLOAT_AND_INT32 = `
import type {TurboModule} from '../RCTExport';
import * as TurboModuleRegistry from '../TurboModuleRegistry';
import type {Int32, Float} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes} from 'react-native';
export interface Spec extends TurboModule {
+getInt: (arg: Int32) => Int32;
+getFloat: (arg: Float) => Float;
+getInt: (arg: CodegenTypes.Int32) => CodegenTypes.Int32;
+getFloat: (arg: CodegenTypes.Float) => CodegenTypes.Float;
}
export default TurboModuleRegistry.getEnforcing<Spec>('SampleTurboModule');
@@ -283,10 +283,12 @@ const NATIVE_MODULE_WITH_UNSAFE_OBJECT = `
import type {TurboModule} from '../RCTExport';
import * as TurboModuleRegistry from '../TurboModuleRegistry';
import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes} from 'react-native';
export interface Spec extends TurboModule {
+getUnsafeObject: (o: UnsafeObject) => UnsafeObject,
+getUnsafeObject: (
o: CodegenTypes.UnsafeObject,
) => CodegenTypes.UnsafeObject,
}
export default TurboModuleRegistry.getEnforcing<Spec>('SampleTurboModule');
@@ -20,8 +20,8 @@ const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
getString: (arg: string) => Array;
@@ -40,8 +40,8 @@ const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
getString: (arg: Array) => string;
@@ -85,8 +85,8 @@ const NATIVE_MODULES_WITH_UNNAMED_PARAMS = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getBool: (boolean) => boolean;
@@ -166,8 +166,8 @@ const EMPTY_ENUM_NATIVE_MODULE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export enum SomeEnum {
}
@@ -191,8 +191,8 @@ const MIXED_VALUES_ENUM_NATIVE_MODULE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export enum SomeEnum {
NUM = 1,
@@ -218,8 +218,8 @@ const NUMERIC_VALUES_ENUM_NATIVE_MODULE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export enum SomeEnum {
NUM = 1,
@@ -246,8 +246,8 @@ const MAP_WITH_EXTRA_KEYS_NATIVE_MODULE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
type MapWithKey = {
[a: string]: string | null,
@@ -271,8 +271,8 @@ const NATIVE_MODULES_WITH_ARRAY_BUFFER_IN_OBJECT_PROPERTY = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
type Row = {
buf: ArrayBuffer;
@@ -296,8 +296,8 @@ const NATIVE_MODULES_WITH_ARRAY_BUFFER_IN_EVENT_EMITTER = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly onBuffer: EventEmitter<ArrayBuffer>;
@@ -20,8 +20,8 @@ const EMPTY_NATIVE_MODULE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
@@ -40,8 +40,8 @@ const NATIVE_MODULE_WITH_COMPLEX_OBJECTS = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export type String = string;
@@ -72,8 +72,8 @@ const NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export type String = string;
@@ -134,8 +134,8 @@ const NATIVE_MODULE_WITH_ALIASES = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
type NumNum = number;
export type Num = (arg: NumNum) => void;
@@ -298,13 +298,12 @@ const NATIVE_MODULE_WITH_FLOAT_AND_INT32 = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {Int32, Float} from 'react-native/Libraries/Types/CodegenTypes';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {CodegenTypes, TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getInt: (arg: Int32) => Int32;
readonly getFloat: (arg: Float) => Float;
readonly getInt: (arg: CodegenTypes.Int32) => CodegenTypes.Int32;
readonly getFloat: (arg: CodegenTypes.Float) => CodegenTypes.Float;
}
export default TurboModuleRegistry.getEnforcing<Spec>('SampleTurboModule');
@@ -320,8 +319,8 @@ const NATIVE_MODULE_WITH_SIMPLE_OBJECT = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getObject: (o: Object) => Object,
@@ -340,12 +339,11 @@ const NATIVE_MODULE_WITH_UNSAFE_OBJECT = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getUnsafeObject: (o: UnsafeObject) => UnsafeObject;
readonly getUnsafeObject: (o: CodegenTypes.UnsafeObject) => CodegenTypes.UnsafeObject;
}
export default TurboModuleRegistry.getEnforcing<Spec>('SampleTurboModule');
@@ -361,8 +359,8 @@ const NATIVE_MODULE_WITH_PARTIALS = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export type SomeObj = {
a: string,
@@ -388,8 +386,8 @@ const NATIVE_MODULE_WITH_PARTIALS_COMPLEX = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export type SomeObj = {
a: string,
@@ -418,8 +416,8 @@ const NATIVE_MODULE_WITH_ROOT_TAG = `
import type {
TurboModule,
RootTag,
} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getRootTag: (rootTag: RootTag) => RootTag;
@@ -438,8 +436,8 @@ const NATIVE_MODULE_WITH_NULLABLE_PARAM = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly voidFunc: (arg: string | null | undefined) => void;
@@ -458,8 +456,8 @@ const NATIVE_MODULE_WITH_BASIC_ARRAY = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getArray: (arg: Array<string>) => (Array<(string)>);
@@ -479,8 +477,8 @@ const NATIVE_MODULE_WITH_BASIC_ARRAY2 = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getArray: (arg: string[]) => ((string)[]);
@@ -500,8 +498,8 @@ const NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
type DisplayMetricsAndroid = {
width: number;
@@ -533,8 +531,8 @@ const NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getArray: (
@@ -555,8 +553,8 @@ const NATIVE_MODULE_WITH_ARRAY2_WITH_UNION_AND_TOUPLE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
getArray(
@@ -577,8 +575,8 @@ const NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export type SomeString = string;
@@ -599,8 +597,8 @@ const NATIVE_MODULE_WITH_ARRAY2_WITH_ALIAS = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export type SomeString = string;
@@ -621,8 +619,8 @@ const NATIVE_MODULE_WITH_COMPLEX_ARRAY = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getArray: (
@@ -643,8 +641,8 @@ const NATIVE_MODULE_WITH_COMPLEX_ARRAY2 = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getArray: (
@@ -665,8 +663,8 @@ const NATIVE_MODULE_WITH_PROMISE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export type String = string;
export type SomeObj = { a: string };
@@ -690,8 +688,8 @@ const NATIVE_MODULE_WITH_CALLBACK = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getValueWithCallback: (
@@ -712,8 +710,8 @@ const NATIVE_MODULE_WITH_UNION = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export type ChooseInt = 1 | 2 | 3;
export type ChooseFloat = 1.44 | 2.88 | 5.76;
@@ -738,8 +736,8 @@ const NATIVE_MODULE_WITH_UNION_RETURN_TYPES = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getStringUnion: () => 'light' | 'dark';
@@ -765,9 +763,8 @@ const NATIVE_MODULE_WITH_EVENT_EMITTERS = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {Double, Float, Int32} from 'react-native/Libraries/Types/CodegenTypes';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {CodegenTypes, TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export type ObjectStruct = {
a: number;
@@ -778,16 +775,16 @@ export type ObjectStruct = {
export type MappedObject = {[key: string]: string};
export interface Spec extends TurboModule {
readonly onEvent1: EventEmitter<void>;
readonly onEvent2: EventEmitter<string>;
readonly onEvent3: EventEmitter<number>;
readonly onEvent4: EventEmitter<boolean>;
readonly onEvent5: EventEmitter<ObjectStruct>;
readonly onEvent6: EventEmitter<ObjectStruct[]>;
readonly onEvent7: EventEmitter<MappedObject>;
readonly onEvent8: EventEmitter<Double>;
readonly onEvent9: EventEmitter<Float>;
readonly onEvent10: EventEmitter<Int32>;
readonly onEvent1: CodegenTypes.EventEmitter<void>;
readonly onEvent2: CodegenTypes.EventEmitter<string>;
readonly onEvent3: CodegenTypes.EventEmitter<number>;
readonly onEvent4: CodegenTypes.EventEmitter<boolean>;
readonly onEvent5: CodegenTypes.EventEmitter<ObjectStruct>;
readonly onEvent6: CodegenTypes.EventEmitter<ObjectStruct[]>;
readonly onEvent7: CodegenTypes.EventEmitter<MappedObject>;
readonly onEvent8: CodegenTypes.EventEmitter<CodegenTypes.Double>;
readonly onEvent9: CodegenTypes.EventEmitter<CodegenTypes.Float>;
readonly onEvent10: CodegenTypes.EventEmitter<CodegenTypes.Int32>;
}
export default TurboModuleRegistry.getEnforcing<Spec>('SampleTurboModule');
@@ -804,8 +801,8 @@ const ANDROID_ONLY_NATIVE_MODULE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {}
@@ -824,8 +821,8 @@ const IOS_ONLY_NATIVE_MODULE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export enum Quality {
SD,
@@ -862,8 +859,8 @@ const CXX_ONLY_NATIVE_MODULE = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export enum Quality {
SD,
@@ -930,9 +927,9 @@ const NAMESPACED_NATIVE_MODULE_WITH_FLOAT_AND_INT32 = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import type {CodegenTypes} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getInt: (arg: CodegenTypes.Int32) => CodegenTypes.Int32;
@@ -952,8 +949,8 @@ const NAMESPACED_NATIVE_MODULE_WITH_UNSAFE_OBJECT = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
import type {CodegenTypes} from 'react-native';
export interface Spec extends TurboModule {
@@ -973,9 +970,9 @@ const NAMESPACED_NATIVE_MODULE_WITH_LOCAL_TYPE_ALIASES = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import type {CodegenTypes} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type Double = CodegenTypes.Double;
type MyFloat = CodegenTypes.Float;
@@ -998,9 +995,9 @@ const NAMESPACED_NATIVE_MODULE_WITH_EVENT_EMITTERS = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import type {CodegenTypes} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type ObjectStruct = {
a: number;
@@ -1034,8 +1031,8 @@ const NATIVE_MODULE_WITH_ARRAY_BUFFER = `
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import type {TurboModule} from 'react-native';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly getArrayBuffer: () => ArrayBuffer;
@@ -8,46 +8,39 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
import type {
CodegenTypes,
ColorValue,
EdgeInsetsValue,
HostComponent,
PointValue,
} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
import type {RootTag} from 'react-native/Libraries/TurboModule/RCTExport';
import type {
Double,
Float,
Int32,
UnsafeMixed,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
RootTag,
ViewProps,
} from 'react-native';
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeCommands, codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
bool: boolean,
string: string,
double: Double,
float: Float,
int: Int32,
mixed: UnsafeMixed,
double: CodegenTypes.Double,
float: CodegenTypes.Float,
int: CodegenTypes.Int32,
mixed: CodegenTypes.UnsafeMixed,
optionalBool?: WithDefault<boolean, false>,
optionalString?: WithDefault<string, ''>,
optionalStringDiffDefault?: WithDefault<string, 'default'>,
optionalDouble?: WithDefault<Double, 0.0>,
optionalFloat?: WithDefault<Float, 0.0>,
optionalInt?: WithDefault<Int32, 0>,
optionalBool?: CodegenTypes.WithDefault<boolean, false>,
optionalString?: CodegenTypes.WithDefault<string, ''>,
optionalStringDiffDefault?: CodegenTypes.WithDefault<string, 'default'>,
optionalDouble?: CodegenTypes.WithDefault<CodegenTypes.Double, 0.0>,
optionalFloat?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>,
optionalInt?: CodegenTypes.WithDefault<CodegenTypes.Int32, 0>,
reserverdEdgeInsets: EdgeInsetsValue,
reservedPointValue: PointValue,
stringUnion?: WithDefault<'foo' | 'bar', 'bar'>,
intUnion?: WithDefault<1 | 2, 1>,
stringUnion?: CodegenTypes.WithDefault<'foo' | 'bar', 'bar'>,
intUnion?: CodegenTypes.WithDefault<1 | 2, 1>,
nestedObject: Readonly<{
string: string,
@@ -59,8 +52,11 @@ type NativeProps = Readonly<{
color: ColorValue,
}>,
arrayStringUnion?: WithDefault<ReadonlyArray<'foo' | 'bar'>, 'foo'>,
arrayStringUnionExtra?: WithDefault<
arrayStringUnion?: CodegenTypes.WithDefault<
ReadonlyArray<'foo' | 'bar'>,
'foo',
>,
arrayStringUnionExtra?: CodegenTypes.WithDefault<
ReadonlyArray<'foo' | 'bar' | 'baz'>,
'bar',
>,
@@ -82,19 +78,22 @@ type NativeProps = Readonly<{
type NativeType = HostComponent<NativeProps>;
type Int = Int32;
type Int = CodegenTypes.Int32;
type Str = string;
type Bool = boolean;
type Fl = Float;
type Dbl = Double;
type Fl = CodegenTypes.Float;
type Dbl = CodegenTypes.Double;
type CustomObj = {foo: string, bar: number};
type CustomObj2 = {a: Int32, b: string};
type CustomObj2 = {a: CodegenTypes.Int32, b: string};
interface NativeCommands {
readonly methodInt: (viewRef: React.ElementRef<NativeType>, a: Int32) => void;
readonly methodInt: (
viewRef: React.ElementRef<NativeType>,
a: CodegenTypes.Int32,
) => void;
readonly methodIntString: (
viewRef: React.ElementRef<NativeType>,
a: Int32,
a: CodegenTypes.Int32,
b: string,
) => void;
readonly methodString: (
@@ -107,11 +106,11 @@ interface NativeCommands {
) => void;
readonly methodFloat: (
viewRef: React.ElementRef<NativeType>,
a: Float,
a: CodegenTypes.Float,
) => void;
readonly methodDouble: (
viewRef: React.ElementRef<NativeType>,
a: Double,
a: CodegenTypes.Double,
) => void;
readonly methodIntAlias: (
@@ -137,7 +136,7 @@ interface NativeCommands {
readonly methodIntArray: (
viewRef: React.ElementRef<NativeType>,
a: Array<Int32>,
a: Array<CodegenTypes.Int32>,
) => void;
readonly methodStringArray: (
viewRef: React.ElementRef<NativeType>,
@@ -149,11 +148,11 @@ interface NativeCommands {
) => void;
readonly methodFloatArray: (
viewRef: React.ElementRef<NativeType>,
a: Array<Float>,
a: Array<CodegenTypes.Float>,
) => void;
readonly methodDoubleArray: (
viewRef: React.ElementRef<NativeType>,
a: Array<Double>,
a: Array<CodegenTypes.Double>,
) => void;
readonly methodCustomObjArray: (
viewRef: React.ElementRef<NativeType>,
@@ -8,16 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Double,
Float,
Int32,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeCommands, codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -28,7 +21,7 @@ type NativeType = HostComponent<NativeProps>;
interface NativeCommands {
readonly methodInt: (
viewRef: React.ElementRef<NativeType>,
a: Array<Int32>,
a: Array<CodegenTypes.Int32>,
) => void;
readonly methodString: (
viewRef: React.ElementRef<NativeType>,
@@ -40,11 +33,11 @@ interface NativeCommands {
) => void;
readonly methodFloat: (
viewRef: React.ElementRef<NativeType>,
a: Array<Float>,
a: Array<CodegenTypes.Float>,
) => void;
readonly methodDouble: (
viewRef: React.ElementRef<NativeType>,
a: Array<Double>,
a: Array<CodegenTypes.Double>,
) => void;
}
@@ -8,16 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Double,
Float,
Int32,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeCommands, codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -26,7 +19,10 @@ type NativeProps = Readonly<{
type NativeType = HostComponent<NativeProps>;
interface NativeCommands {
readonly methodInt: (viewRef: React.ElementRef<NativeType>, a: Int32) => void;
readonly methodInt: (
viewRef: React.ElementRef<NativeType>,
a: CodegenTypes.Int32,
) => void;
readonly methodString: (
viewRef: React.ElementRef<NativeType>,
a: string,
@@ -37,11 +33,11 @@ interface NativeCommands {
) => void;
readonly methodFloat: (
viewRef: React.ElementRef<NativeType>,
a: Float,
a: CodegenTypes.Float,
) => void;
readonly methodDouble: (
viewRef: React.ElementRef<NativeType>,
a: Double,
a: CodegenTypes.Double,
) => void;
}
@@ -8,11 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {HostComponent, ViewProps} from 'react-native';
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeCommands, codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -8,12 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {Int32} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeCommands, codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -24,7 +21,7 @@ type NativeType = HostComponent<NativeProps>;
interface NativeCommands {
readonly methodInt: (
viewRef: React.ElementRef<NativeType>,
a: Int32,
a: CodegenTypes.Int32,
b: string,
) => void;
}
@@ -8,12 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {Int32} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeCommands, codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -22,7 +19,10 @@ type NativeProps = Readonly<{
type NativeType = HostComponent<NativeProps>;
interface NativeCommands {
readonly methodInt: (viewRef: React.ElementRef<NativeType>, a: Int32) => void;
readonly methodInt: (
viewRef: React.ElementRef<NativeType>,
a: CodegenTypes.Int32,
) => void;
readonly methodString: (
viewRef: React.ElementRef<NativeType>,
a: string,
@@ -8,12 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {Int32} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeCommands, codegenNativeComponent} from 'react-native';
type NativeProps = Readonly<{
...ViewProps,
@@ -22,7 +19,10 @@ type NativeProps = Readonly<{
type NativeType = HostComponent<NativeProps>;
interface NativeCommands {
readonly methodInt: (viewRef: React.ElementRef<NativeType>, a: Int32) => void;
readonly methodInt: (
viewRef: React.ElementRef<NativeType>,
a: CodegenTypes.Int32,
) => void;
}
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
@@ -8,21 +8,16 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
text: string,
backgroundColor?: WithDefault<string, 'transparent'>,
height?: WithDefault<Int32, 100>,
width?: WithDefault<Int32, 100>,
backgroundColor?: CodegenTypes.WithDefault<string, 'transparent'>,
height?: CodegenTypes.WithDefault<CodegenTypes.Int32, 100>,
width?: CodegenTypes.WithDefault<CodegenTypes.Int32, 100>,
}>;
export default codegenNativeComponent<Props>(
@@ -8,21 +8,16 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
text: string,
backgroundColor?: WithDefault<string, 'transparent'>,
height?: WithDefault<Int32, 100>,
width: Int32,
backgroundColor?: CodegenTypes.WithDefault<string, 'transparent'>,
height?: CodegenTypes.WithDefault<CodegenTypes.Int32, 100>,
width: CodegenTypes.Int32,
}>;
export default codegenNativeComponent<Props>(
@@ -8,30 +8,23 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Double,
Float,
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
bool: boolean,
string: string,
double: Double,
float: Float,
int: Int32,
stringUnion: WithDefault<'foo' | 'bar', 'bar'>,
intUnion: WithDefault<1 | 2, 1>,
double: CodegenTypes.Double,
float: CodegenTypes.Float,
int: CodegenTypes.Int32,
stringUnion: CodegenTypes.WithDefault<'foo' | 'bar', 'bar'>,
intUnion: CodegenTypes.WithDefault<1 | 2, 1>,
mixed: unknown,
backgroundColor?: WithDefault<string, 'transparent'>,
height?: WithDefault<Int32, 100>,
backgroundColor?: CodegenTypes.WithDefault<string, 'transparent'>,
height?: CodegenTypes.WithDefault<CodegenTypes.Int32, 100>,
}>;
export default codegenNativeComponent<Props>(
@@ -8,15 +8,16 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
sizes?: WithDefault<ReadonlyArray<'small' | 'large' | 'huge'>, 'small'>,
sizes?: CodegenTypes.WithDefault<
ReadonlyArray<'small' | 'large' | 'huge'>,
'small',
>,
}>;
export default codegenNativeComponent<Props>(
@@ -8,15 +8,13 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
sizes?: WithDefault<ReadonlyArray<'small' | 'large'>, 'small'>,
sizes?: CodegenTypes.WithDefault<ReadonlyArray<'small' | 'large'>, 'small'>,
}>;
export default codegenNativeComponent<Props>(
@@ -8,20 +8,15 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
text: Int32,
backgroundColor?: WithDefault<string, 'transparent'>,
height?: WithDefault<Int32, 100>,
text: CodegenTypes.Int32,
backgroundColor?: CodegenTypes.WithDefault<string, 'transparent'>,
height?: CodegenTypes.WithDefault<CodegenTypes.Int32, 100>,
}>;
export default codegenNativeComponent<Props>(
@@ -8,20 +8,15 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
text: string,
backgroundColor?: WithDefault<string, 'white'>,
height?: WithDefault<Int32, 100>,
backgroundColor?: CodegenTypes.WithDefault<string, 'white'>,
height?: CodegenTypes.WithDefault<CodegenTypes.Int32, 100>,
}>;
export default codegenNativeComponent<Props>(
@@ -8,25 +8,19 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Float,
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
text: string,
backgroundColor?: WithDefault<string, 'transparent'>,
height?: WithDefault<Int32, 100>,
backgroundColor?: CodegenTypes.WithDefault<string, 'transparent'>,
height?: CodegenTypes.WithDefault<CodegenTypes.Int32, 100>,
pins: Readonly<{
x: Float,
y: Float,
color?: WithDefault<string, 'red'>,
x: CodegenTypes.Float,
y: CodegenTypes.Float,
color?: CodegenTypes.WithDefault<string, 'red'>,
}>,
}>;
@@ -8,24 +8,18 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Float,
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
text: string,
backgroundColor?: WithDefault<string, 'transparent'>,
height?: WithDefault<Int32, 100>,
backgroundColor?: CodegenTypes.WithDefault<string, 'transparent'>,
height?: CodegenTypes.WithDefault<CodegenTypes.Int32, 100>,
pins: Readonly<{
x: Float,
y: Float,
x: CodegenTypes.Float,
y: CodegenTypes.Float,
color: string,
}>,
}>;
@@ -8,24 +8,18 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Float,
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
text: string,
backgroundColor?: WithDefault<string, 'transparent'>,
height?: WithDefault<Int32, 100>,
backgroundColor?: CodegenTypes.WithDefault<string, 'transparent'>,
height?: CodegenTypes.WithDefault<CodegenTypes.Int32, 100>,
pins: Readonly<{
x: Float,
y: Float,
x: CodegenTypes.Float,
y: CodegenTypes.Float,
}>,
}>;
@@ -8,15 +8,13 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
size?: WithDefault<'small' | 'huge' | 'large', 'small'>,
size?: CodegenTypes.WithDefault<'small' | 'huge' | 'large', 'small'>,
}>;
export default codegenNativeComponent<Props>(
@@ -8,15 +8,13 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
size?: WithDefault<'small' | 'large', 'small'>,
size?: CodegenTypes.WithDefault<'small' | 'large', 'small'>,
}>;
export default codegenNativeComponent<Props>(
@@ -8,20 +8,15 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
text: string,
backgroundColor?: WithDefault<string, 'transparent'>,
height?: WithDefault<Int32, 100>,
backgroundColor?: CodegenTypes.WithDefault<string, 'transparent'>,
height?: CodegenTypes.WithDefault<CodegenTypes.Int32, 100>,
}>;
export default codegenNativeComponent<Props>(
@@ -8,10 +8,9 @@
* @format
*/
import type {HostComponent} from 'react-native';
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {HostComponent, ViewProps} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {codegenNativeComponent} from 'react-native';
export type Props = Readonly<{
...ViewProps,
@@ -9,9 +9,9 @@
/* eslint-disable no-unused-vars */
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type SimpleObject = {||};
@@ -8,9 +8,9 @@
*/
/* eslint-disable no-unused-vars */
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type SimpleObject = {||};
@@ -9,9 +9,9 @@
/* eslint-disable no-unused-vars */
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type SimpleObject = {};
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (a: string, b: number) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (a: string, b: number) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (a: string, b: number) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (a: string, b: number) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (a: string, b: number) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (a: string, b: number) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (a: string, b: number) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type MyType = () => Promise<number>;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type MyType = () => Promise<string>;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (
@@ -9,10 +9,12 @@
/* eslint-disable no-unused-vars */
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes';
import type {
CodegenTypes,
TurboModule,
} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type StringLiteral0 = 'foo';
type StringLiteral1 = 'bar';
@@ -108,7 +110,7 @@ type NonNullableType = Object;
type NullableType = ?Object;
type GenericObjectType = Object;
type UnsafeObjectType = UnsafeObject;
type UnsafeObjectType = CodegenTypes.UnsafeObject;
type OptionalTypeLessProps = ?{
prop1: string,
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (a: {[key: string]: string}, b: number) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (a: {[key: string]: number}, b: number) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
enum TestEnum {
A = 1,
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
enum TestEnum {
A = 1,
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
enum TestEnum {
A = '1',
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
enum TestEnum {
A = 1,
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
enum TestEnum {
A = 1,
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
enum TestEnum {
A = '1',
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
enum TestEnum {
A = 1,
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
enum TestEnum {
A = 1,
@@ -8,10 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {EventEmitter} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type ObjectStruct = {
a: number,
@@ -20,10 +19,10 @@ export type ObjectStruct = {
};
export interface Spec extends TurboModule {
onPress: EventEmitter<string>;
onClick: EventEmitter<number>;
onChange: EventEmitter<ObjectStruct[]>;
onSubmit: EventEmitter<ObjectStruct>;
onPress: CodegenTypes.EventEmitter<string>;
onClick: CodegenTypes.EventEmitter<number>;
onChange: CodegenTypes.EventEmitter<ObjectStruct[]>;
onSubmit: CodegenTypes.EventEmitter<ObjectStruct>;
}
export default TurboModuleRegistry.getEnforcing<Spec>(
@@ -8,10 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {EventEmitter} from 'react-native/Libraries/Types/CodegenTypes';
import type {CodegenTypes, TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export type ObjectStruct = {
a: number,
@@ -20,10 +19,10 @@ export type ObjectStruct = {
};
export interface Spec extends TurboModule {
onPress: EventEmitter<void>;
onClick: EventEmitter<string>;
onChange: EventEmitter<ObjectStruct>;
onSubmit: EventEmitter<ObjectStruct[]>;
onPress: CodegenTypes.EventEmitter<void>;
onClick: CodegenTypes.EventEmitter<string>;
onChange: CodegenTypes.EventEmitter<ObjectStruct>;
onSubmit: CodegenTypes.EventEmitter<ObjectStruct[]>;
}
export default TurboModuleRegistry.getEnforcing<Spec>(
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
export interface Spec extends TurboModule {
readonly exampleFunction: (a: string, b: number, c?: number) => void;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
// Changed to incompatible type
type BooleanUnion = true | false;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type BooleanUnion = true;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type testUnion = 'a' | 'b' | 'c' | 'd';
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type testUnion = 'a' | '0' | '1' | 'a long string';
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type testUnion = 'a' | 'b' | 'c' | 'd';
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type testUnion = 'a' | 'b' | 'c';
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type NumberUnion = 4 | 5 | 6;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type NumberUnion = 1 | 2 | 3;
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type ObjectA = {|
kind: 'a',
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type ObjectA = {|
kind: 'a',
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type ObjectA = {|
kind: 'a',
@@ -8,9 +8,9 @@
* @format
*/
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from 'react-native';
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
import {TurboModuleRegistry} from 'react-native';
type testUnion = 1 | 2 | 3;
Loaded 100 of 102 files, more files were not shown because too many files have changed in this diff. Show more