Likely to cause new Flow errors:
- Class component configs are computed with
React.ReactManagedAttributes - Errors on keys read from
keyofover an object with an indexer are now reported at the use of the key instead of at the indexer - Arguments of
Objectstatic method calls that Flow doesn't type specially now get contextual types from the method's signature, like other method calls. use()calls in functions that Flow can't place in a component or hook now get thereact-rule-hook-conditionalerror code instead ofreact-rule-hook.- JSX intrinsics are typed by
React.JSX.IntrinsicElementsinstead of$JSXIntrinsics, which Flow no longer reads.experimental.jsx_intrinsic_elementsonly acceptstrue. - Class component configs always merge default props with
React.ReactManagedAttributes.experimental.react_managed_attributesonly acceptstrue.
New Features:
- Support fractional and other finite numeric property keys in Flow, using JavaScript property-name stringification.
Notable bug fixes:
!= nulland truthiness refinements removenullandundefinedfrom unions with optional or nested maybe members also when the union is optimized- Truthiness and falsiness refinements filter intersection members represented by chains of type variables
- Methods of an interface with a construct signature, such as
Number.isFiniteandDate.parse, can be read without their receiver, like class statics. - Reading
prototypefrom a function or a callable object that doesn't declare it givesany, as declared by the builtinFunction, instead of aprop-missingerror - Preserve nominal and intrinsic render types in match pattern bindings.
flow-nodeno longer drops script arguments that equal a Node option passed before the script path.flow-upgradeadds thenameFunctionTypeParamsandnameIndexerKeyscodemods, andremoveExplicitlyExactObjectTypeSyntaxalso removesambiguous-object-typelint comments.
Parser:
- Parse TypeScript's definite assignment assertions on class fields,
value!: T, and variables,let x!: T - Fixed parse time that doubled with each level of nested conditional expressions with parenthesized consequents
PropertyDescriptorandPropertyDescriptorMapare now interfaces, as in TypeScriptObjectis now declared asinterface Object+interface ObjectConstructor, as in TypeScriptFunctionis now declared asinterface Function+interface FunctionConstructor, withCallableFunctionandNewableFunction, as in TypeScript