From 75c0a388dd6682d057765dd79eeb3ba52cbf44e6 Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Fri, 9 Sep 2022 10:47:38 -0400 Subject: [PATCH] Flow: enable exact_by_default With this change, a simple object type `{ }` means an exact object `{| |}` which most people assume. Opting for inexact requires the extra `{ a: number, ... }` syntax at the end. A followup, someone could replace all the `{| |}` with `{ }`. --- scripts/flow/config/flowconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/flow/config/flowconfig b/scripts/flow/config/flowconfig index 5bae0b389a968..86fe4f9fe2ed4 100644 --- a/scripts/flow/config/flowconfig +++ b/scripts/flow/config/flowconfig @@ -37,18 +37,17 @@ [lints] untyped-type-import=error -implicit-inexact-object=error [options] server.max_workers=4 esproposal.class_static_fields=enable esproposal.class_instance_fields=enable esproposal.optional_chaining=enable +exact_by_default=true +munge_underscores=false # Substituted by createFlowConfig.js: %REACT_RENDERER_FLOW_OPTIONS% -munge_underscores=false - [version] ^0.122.0