From bbd56b278cea8ab46f1d0439d20ad521381c36af Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Fri, 9 Sep 2022 12:16:40 -0400 Subject: [PATCH] Flow: enable exact_by_default (#25220) 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