Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Automatically generated from components_failure/PROP_NUMBER_TYPE.flow.js
// (/react-native/packages/react-native-codegen/src/parsers/flow/components/__test_fixtures__/failures.js)
import {ViewProps} from 'react-native-tscodegen-types';
import {NativeComponent} from 'react-native-tscodegen-types';
import {codegenNativeComponent} from 'react-native-tscodegen-types';
'use strict';
export type ModuleProps = Readonly;
export default (codegenNativeComponent('Module') as NativeComponent);
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Automatically generated from modules_success/EMPTY_NATIVE_MODULE.flow.js
// (/react-native/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/fixtures.js)
import {TurboModule} from 'react-native-tscodegen-types'
import {TurboModuleRegistry} from 'react-native-tscodegen-types';
'use strict';
export interface Spec extends TurboModule {
}
export default TurboModuleRegistry.getEnforcing('SampleTurboModule');
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Automatically generated from modules_failure/NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM.flow.js
// (/react-native/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/failures.js)
import {TurboModule} from 'react-native-tscodegen-types'
import {TurboModuleRegistry} from 'react-native-tscodegen-types';
'use strict';
export interface Spec extends TurboModule {
getString(arg: Array): string;
}
export default TurboModuleRegistry.getEnforcing('SampleTurboModule');
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Automatically generated from modules_success/NATIVE_MODULE_WITH_NULLABLE_PARAM.flow.js
// (/react-native/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/fixtures.js)
import {ReactNull} from 'react-native-tscodegen-types';
import {TurboModule} from 'react-native-tscodegen-types'
import {TurboModuleRegistry} from 'react-native-tscodegen-types';
'use strict';
export interface Spec extends TurboModule {
voidFunc(arg: (ReactNull | string)): void;
}
export default TurboModuleRegistry.getEnforcing('SampleTurboModule');
// (/react-native/packages/react-native-codegen/e2e/__test_fixtures__)
import {TurboModule} from 'react-native-tscodegen-types'
import {TurboModuleRegistry} from 'react-native-tscodegen-types';
'use strict';
export type Number = number;
type AnotherNumber = Number;
export interface Spec extends TurboModule {
getNumber(arg: number): number;
getNumberWithAlias(arg: Number): AnotherNumber;
}
export default (TurboModuleRegistry.getEnforcing('SampleTurboModule') as Spec);
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Automatically generated from modules_failure/TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT.flow.js
// (/react-native/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/failures.js)
import {TurboModuleRegistry} from 'react-native-tscodegen-types';
'use strict';
export default TurboModuleRegistry.getEnforcing('SampleTurboModule1');
export default TurboModuleRegistry.getEnforcing('SampleTurboModule2');
string_optional_key?: string;
double_optional_value: (ReactNull | Double);
float_optional_value: (ReactNull | Float);
int32_optional_both?: (ReactNull | Int32);
});
};
}>;
export type ModuleProps = Readonly;
onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler;
onDirectEventDefinedInline: DirectEventHandler;
onDirectEventDefinedInlineWithPaperName: DirectEventHandler;
}>;
export default (codegenNativeComponent('Module') as NativeComponent);
import {ViewProps} from 'react-native-tscodegen-types';
import {NativeComponent} from 'react-native-tscodegen-types';
import {codegenNativeComponent} from 'react-native-tscodegen-types';
import {codegenNativeCommands} from 'react-native-tscodegen-types';
'use strict';
export type ModuleProps = Readonly;
export const Commands = codegenNativeCommands<{
readonly hotspotUpdate: (ref: React.Ref<'RCTView'>, x: Int32, y: Int32) => void;
}>({
supportedCommands: ['hotspotUpdate']
});
export default (codegenNativeComponent('Module') as NativeComponent);
type DeepSpread = Readonly<{
otherStringProp: string;
}>;
export type PropsInFile = Readonly;
export type ModuleProps = Readonly;
localArr: ReadonlyArray;
}>;
export default (codegenNativeComponent('Module') as NativeComponent);
interface NativeCommands {
hotspotUpdate(viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32): void;
}
export type ModuleProps = Readonly;
export const Commands = codegenNativeCommands({
supportedCommands: ['hotspotUpdate']
});
export const Commands2 = codegenNativeCommands({
supportedCommands: ['hotspotUpdate']
});
export default (codegenNativeComponent('Module') as NativeComponent);