###v0.18.0
Likely to cause new Flow errors:
- Flow is now stricter (and more consistent) about how
null
works when used as an initialization value for object properties that are mutated later. Solet o = {prop: null}; o.prop = 42;
is now an error and requires thatnull
be annotated:let o = {prop: (null: ?number)};
. - The return type of RegExp.prototype.match() is now properly annotated to return a nullable.
New Features:
- We now take advantage of the guarantee that
const
variables are read-only when doing refinements. This means that refinements ofconst
variables now have much fewer caveats than refinements oflet
s orvar
s!