Releases: facebook/flow
Releases · facebook/flow
[flow] v0.311.0
New Features:
- Added support for string and number literal properties in
declare classandinterface
Library Definitions:
- Change the
Record<K, T>utility type's key bound fromK: stringtoK: PropertyKey, allowingnumberandsymbolkeys in addition tostring - Added some TS built-in types that were missing from Flow's core lib
Misc:
- When
experimental.allow_variance_keywordsis set totrue, we support the keywordsin/out/readonlyalong with+/-for variance
v0.310.0
New Features:
- Support constructor type signatures (
new (...) => Type) in interfaces anddeclare class
Misc:
- When
allow_variance_keywordsis set to true, Flow stops erroring forin/out/readonly
v0.309.0
No significant changes.
v0.308.0
Parser:
- The 5 enum body ESTree node types (
EnumBooleanBody,EnumNumberBody,EnumStringBody,EnumSymbolBody,EnumBigIntBody) have been replaced with a singleEnumBodynode. Itsmembersproperty is a flat array of per-type member nodes (EnumBooleanMember,EnumNumberMember,EnumStringMember,EnumBigIntMember,EnumDefaultedMember). TheexplicitTypeproperty is now a string ("boolean","number","string","symbol","bigint") ornull(previously a boolean).hasUnknownMembersremains a boolean. Several enum validation errors are no longer reported by the parser and are instead reported by the type checker.
Library Definitions:
- Add type definition for
RegExp.escape()
v0.307.1
- Misc: Store exports index in saved state
[flow][ezFixUp] v0.307.0
Notable bug fixes:
- Support numeric literal object keys when importing/exporting object literals
- Allow type keywords like
inferto appear as member names in qualified type access (e.g.type S = O.infer;). - Allow type keywords (
readonly,keyof,infer, etc.) as function type parameter names
Parser:
- It is now a parse error to have a
?optional modifier in various places this does not make sense, e.g.const x? = 1;
Misc:
- API change:
flow checkbecomes an alias offlow status. You can useflow full-checkto trigger a full foreground check of a Flow root.
v0.306.1
- Fix in Meta-internal saved state logic
v0.306.0
New Features:
- Support for using well-known symbols as property names in types - the form should be exactly
Symbol.iterator.
Notable bug fixes:
- Report prop-missing errors for unbound module properties in explicit type args used with implicit instantiation (e.g. try-Flow)
Library Definitions:
- Updated core.js library definitions to accept readonly tuples in Map constructor
v0.305.1
- Fix in saved state on projects including files outside the project root.
v0.305.0
Misc:
- Add autofix for colon-style type parameter bounds to extends-style type parameter bounds