@samitouri / QOS-React-2 / commits / bbd56b278c

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 `{ }`.

Jan Kassens committed Sep 9, 2022 at 12:16 UTC bbd56b278cea8ab46f1d0439d20ad521381c36af
1 file changed +2 -3
scripts/flow/config/flowconfig
+2 -3
@@ -37,18 +37,17 @@
37
38 [lints]
39 untyped-type-import=error
40 -implicit-inexact-object=error
40
41 [options]
42 server.max_workers=4
43 esproposal.class_static_fields=enable
44 esproposal.class_instance_fields=enable
45 esproposal.optional_chaining=enable
46 +exact_by_default=true
47 +munge_underscores=false
48
49 # Substituted by createFlowConfig.js:
50 %REACT_RENDERER_FLOW_OPTIONS%
51
51 -munge_underscores=false
52 -
52 [version]
53 ^0.122.0