mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove pipes from Object literal Flow types
Summary:
## Changes
{| ... |} -> { ... }
**Motivation:** In Flow, object literals are exact by default. So, there's no need for the pipes. Also: Now, the syntax for object literals is consistent across react-native-codegen.
Changelog: [Internal]
Reviewed By: hramos
Differential Revision: D24774771
fbshipit-source-id: 24ceb6f5876122aa8ad9e08c7e903215864ad6f5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cb7f3f4499
commit
00cfb0f919
+4
-4
@@ -27,12 +27,12 @@ const {unwrapNullable} = require('../../parsers/flow/modules/utils');
|
||||
type FilesOutput = Map<string, string>;
|
||||
|
||||
function FileTemplate(
|
||||
config: $ReadOnly<{|
|
||||
config: $ReadOnly<{
|
||||
packageName: string,
|
||||
className: string,
|
||||
methods: string,
|
||||
imports: string,
|
||||
|}>,
|
||||
}>,
|
||||
): string {
|
||||
const {packageName, className, methods, imports} = config;
|
||||
return `
|
||||
@@ -62,14 +62,14 @@ ${methods}
|
||||
}
|
||||
|
||||
function MethodTemplate(
|
||||
config: $ReadOnly<{|
|
||||
config: $ReadOnly<{
|
||||
abstract: boolean,
|
||||
methodBody: ?string,
|
||||
methodJavaAnnotation: string,
|
||||
methodName: string,
|
||||
translatedReturnType: string,
|
||||
traversedArgs: Array<string>,
|
||||
|}>,
|
||||
}>,
|
||||
): string {
|
||||
const {
|
||||
abstract,
|
||||
|
||||
Reference in New Issue
Block a user