From 846ec0d3fd45b1127daa682e22669d8ff32f3592 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Mon, 4 Dec 2023 06:52:09 -0800 Subject: [PATCH] Remove flow exact object syntax {| brace pipe |} from TM example (#41779) Summary: Changelog: [Internal] `exact_by_default` (https://flow.org/en/docs/types/objects/#exact-and-inexact-object-types) is turned on - https://github.com/facebook/react-native/blob/main/.flowconfig#L40 - so we don't need these extra `|`. Reviewed By: rshest Differential Revision: D51803601 --- .../NativeCxxModuleExample/NativeCxxModuleExample.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/rn-tester/NativeCxxModuleExample/NativeCxxModuleExample.js b/packages/rn-tester/NativeCxxModuleExample/NativeCxxModuleExample.js index e4a6d6c100f7d6..74e628a1b10cbd 100644 --- a/packages/rn-tester/NativeCxxModuleExample/NativeCxxModuleExample.js +++ b/packages/rn-tester/NativeCxxModuleExample/NativeCxxModuleExample.js @@ -36,23 +36,23 @@ export type UnionFloat = 1.44 | 2.88 | 5.76; export type UnionString = 'One' | 'Two' | 'Three'; export type UnionObject = {value: number} | {low: string}; -export type ConstantsStruct = {| +export type ConstantsStruct = { const1: boolean, const2: number, const3: string, -|}; +}; -export type ObjectStruct = {| +export type ObjectStruct = { a: number, b: string, c?: ?string, -|}; +}; -export type ValueStruct = {| +export type ValueStruct = { x: number, y: string, z: ObjectStruct, -|}; +}; export type CustomHostObject = {};