diff --git a/packages/react-native-codegen/src/parsers/flow/components/__test_fixtures__/fixtures.js b/packages/react-native-codegen/src/parsers/flow/components/__test_fixtures__/fixtures.js index 083663df81..01de8d9ac9 100644 --- a/packages/react-native-codegen/src/parsers/flow/components/__test_fixtures__/fixtures.js +++ b/packages/react-native-codegen/src/parsers/flow/components/__test_fixtures__/fixtures.js @@ -43,19 +43,19 @@ const EVENT_DEFINITION = ` object_required: { boolean_required: boolean, - } + }, object_optional_key?: { string_optional_key?: string, - } + }, object_optional_value: ?{ float_optional_value: ?Float, - } + }, object_optional_both?: ?{ int32_optional_both?: ?Int32, - } + }, object_required_nested_2_layers: { object_optional_nested_1_layer?: ?{ @@ -65,7 +65,7 @@ const EVENT_DEFINITION = ` float_optional_value: ?Float, int32_optional_both?: ?Int32, } - } + }, `; const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS = ` @@ -500,7 +500,7 @@ const codegenNativeComponent = require('codegenNativeComponent'); type DeepSpread = $ReadOnly<{| otherStringProp: string, -|}> +|}>; export type PropsInFile = $ReadOnly<{| ...DeepSpread, @@ -511,11 +511,11 @@ export type PropsInFile = $ReadOnly<{| export type ModuleProps = $ReadOnly<{| ...ViewProps, - ...PropsInFile + ...PropsInFile, localType: $ReadOnly<{| ...PropsInFile - |}> + |}>, localArr: $ReadOnlyArray |}>; @@ -898,7 +898,7 @@ export type ModuleProps = $ReadOnly<{| type NativeType = NativeComponent; -export type ScrollTo = (viewRef: React.ElementRef, y: Int, animated: Boolean) => Void +export type ScrollTo = (viewRef: React.ElementRef, y: Int, animated: Boolean) => Void; interface NativeCommands { +scrollTo: ScrollTo; diff --git a/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/failures.js b/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/failures.js index 57aa74b51c..9970e85943 100644 --- a/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/failures.js +++ b/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/failures.js @@ -199,11 +199,11 @@ import type {TurboModule} from '../RCTExport'; import * as TurboModuleRegistry from '../TurboModuleRegistry'; export interface Spec extends TurboModule { - +getSth(a : ?number) => void + +getSth: (a : ?number) => void } export interface Spec2 extends TurboModule { - +getSth(a : ?number) => void + +getSth: (a : ?number) => void } diff --git a/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/fixtures.js b/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/fixtures.js index 4a6c9f4f1d..bb8007b862 100644 --- a/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/fixtures.js +++ b/packages/react-native-codegen/src/parsers/flow/modules/__test_fixtures__/fixtures.js @@ -50,7 +50,7 @@ const NATIVE_MODULE_WITH_COMPLEX_OBJECTS = ` import type {TurboModule} from '../RCTExport'; import * as TurboModuleRegistry from '../TurboModuleRegistry'; -export type String = string +export type String = string; export interface Spec extends TurboModule { // Exported methods. @@ -208,7 +208,7 @@ import type {TurboModule} from '../RCTExport'; import * as TurboModuleRegistry from '../TurboModuleRegistry'; export interface Spec extends TurboModule { - +getObject(o : Object) => Object, + +getObject: (o : Object) => Object, } export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); @@ -390,7 +390,7 @@ const NATIVE_MODULE_WITH_PROMISE = `/** import type {TurboModule} from '../RCTExport'; import * as TurboModuleRegistry from '../TurboModuleRegistry'; -export type String = string +export type String = string; export type SomeObj = {| a: string |}; export interface Spec extends TurboModule {