Skip to content

Commit

Permalink
Flow: enable exact_by_default (#25220)
Browse files Browse the repository at this point in the history
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 `{ }`.
  • Loading branch information
kassens authored and rickhanlonii committed Oct 5, 2022
1 parent 4b0a08c commit 6660e5c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/flow/config/flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6660e5c

Please sign in to comment.