Adds static typing to JavaScript to improve developer productivity and code quality.
MIT License
Bot releases are visible (Hide)
Published by facebook-github-bot over 2 years ago
Notable bug fixes:
Reverted changes that cause Flow to generate a corrupted saved-state when libdef changes.
Published by facebook-github-bot over 2 years ago
Likely to cause new Flow errors:
next
parameter to void
. If a non-void next
type is desired for a function, it will have to be annotated.experimental.enforce_local_inference_annotations
is enabled, Flow now requires annotations on functions returned from async or generator functions.New Features:
experimental.enforce_local_inference_annotations
is enabled, Flow now has a code action to auto-annotate parameters of functions that have missing-local-annot
errors.Notable bug fixes:
import type * ...
, export async ...
statements or nameless named exports.Misc:
--no-enums
flag to flow ast
.Parser:
"use strict"
Library Definitions:
Navigator.canShare()
.Published by facebook-github-bot over 2 years ago
Likely to cause new Flow errors:
Notable bug fixes:
\/
. This could have broken IDE integrations while typing.Parser:
d
RegExp flag (see RegExp Match Indices).Library Definitions:
Published by facebook-github-bot over 2 years ago
Notable Bug Fixes:
e.g. import ''
) is added.Published by facebook-github-bot over 2 years ago
Likely to cause new Flow errors:
require
, since requiring a module can have side effectsNew Features:
useId
, useInsertionEffect
and useSyncExternalStore
Notable bug fixes:
x instanceof A
when x
is typed as any
refines it to A
instead of empty
[include]
entries containing both globs and relative paths on WindowsParser:
export interface ...
or export enum ...
Published by facebook-github-bot over 2 years ago
Likely to cause new Flow errors:
any
typedinterface {}
name === 'literal'
and name.prop === 'literal'
complaining that literal
is incompatible with the type of name
or name.prop
.interface {}
rather than $NotNullOrVoid
; number
and boolean
inputs will now errorNew Features:
useState
when it is called with an empty object. Use with flow codemod annotate-use-state
Notable bug fixes:
literal
is a subtype of expr
in expr === literal
, regardless of whether expr === literal
can be applied as a refinementParser:
Library Definitions:
Published by facebook-github-bot over 2 years ago
Notable bug fixes:
module.system=haste
and have both a @providesModule foo
file (or use "haste paths" to derive the module name from its filename) and a node_modules/foo
folder, require('foo')
will now resolve to the Haste module, even when node_modules/foo
is in that file's parent directories. This is also a significant perf improvement because resolving a Haste module is much cheaper than searching for node_modules.Published by facebook-github-bot over 2 years ago
Revert changes that are causing bugs in non-lazy mode.
Published by facebook-github-bot over 2 years ago
Fix crash when comparing abstract and concrete locations when simplifying normalized types.
Published by facebook-github-bot over 2 years ago
Likely to cause new Flow errors:
new
on functions. Move usages of this pattern to use ES6 classes instead. If the pattern exists in third-party code that cannot be changed directly, you can use a declaration file to type the legacy pattern with a declare class
.Notable changes:
React.createClass
from Flow. It is now just typed as any
. Migrate any components using it to class components or function components.module.missing_module_generators
option, which can be used (multiple times) to specify 'regex' -> 'command'
pairs. When a module is missing, if its name matches one of the regexes, we will add a suggestion in the error message to run command
to generate it (and resolve the error).Published by facebook-github-bot over 2 years ago
Bug fixes:
flow stop
to kill stuck serversPublished by facebook-github-bot over 2 years ago
Notable changes:
for
loopsFLOW_CONFIG_NAME
env as alternative to passing --flowconfig-name
file_watcher.mergebase_with.{git,hg}
configs to support projects accessible via multiple VCSs (e.g. git mirrors of hg repositories)IDE integration:
require()
flow-remove-types:
this
param with trailing commasPublished by facebook-github-bot over 2 years ago
Fix crash when Flow receives duplicate file deletion notifications introduced in v0.174.
Published by facebook-github-bot over 2 years ago
Likely to cause new Flow errors:
New Features:
void
, instead of an error.Notable bug fixes:
declare
function that comes after a function declaration of the same name (try-Flow).this-in-exported-function
for functions with a this
parameter.Misc:
--list-files
flag to status
and check
commands. This will dump a list of files that contain errors instead of the error messages..dfind_log
file alongside the .log
and .monitor_log
files.any
. With this change, such type parameters are now considered to be uncovered. This results in Flow now computing a lower coverage percentage on modules where this pattern is present or that import types from other modules that use this pattern.Published by facebook-github-bot over 2 years ago
Likely to cause new Flow errors:
instanceof
checks and other refinements to more consistently detect when impossible or invalid refinements are made. This will result in new errors in such cases.New Features:
Notable bug fixes:
Misc:
Parser:
<
(e.g., f<<T>()=>S>()
) would be incorrectly parsed as the left shift operator.Library Definitions:
util.types
Published by facebook-github-bot over 2 years ago
Bug Fixes:
$Values<>
types in an export position (e.g. Try Flow)module.file_ext
when resolving imports. Before, they were tried alphabetically.Misc:
signature-verification-failure
from a lint to a normal error. It is no longer valid in the [lints]
section of .flowconfig
.Likely to cause new Flow errors:
experimental.new_merge
option becomes true
by default. This is an internal change in the way file signatures are computed, but may cause new [invalid-exported-annotation]
errors when a file exports types that include certain kinds of complex operations, such as projections over complex utility types like $ObjMap
. These errors can be fixed by replacing these complex types with simpler ones. In certain cases, the newly added $KeyMirror
and $ObjMapConst
types (that are exempt of this restriction) can be used instead.Notable bug fixes:
Parser:
export * as x from 'y'
is now an ExportAllDeclaration
with an exported
key.esproposal_nullish_coalescing
option.esproposal_optional_chaining
option.esproposal_class_static_fields
option.esproposal_class_instance_fields
option.Library Definitions:
options
parameters in node's fsPromises
optional.Published by facebook-github-bot over 2 years ago
Another light release due to the new year. Changes are mainly internal --
refactoring or progress towards future features.
Published by facebook-github-bot almost 3 years ago
This release is light on changes due to the holidays. Happy New Year!
Published by facebook-github-bot almost 3 years ago
Notable bug fixes: