Closed rrdelaney closed 7 years ago
Flow object types are "open" in Reason terms. There is a way of defining a "closed" types in Flow, using exact object types.
Thanks to @bbqbaron for bringing this up 😄
declare type t = {| foo: string, bar: number |}
should transform to an closed object type:
type t = Js.t {. foo : string, bar : float};
Flow object types are "open" in Reason terms. There is a way of defining a "closed" types in Flow, using exact object types.
Thanks to @bbqbaron for bringing this up 😄
Example
should transform to an closed object type: