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 4 years ago
Notable bug fixes:
Published by facebook-github-bot over 4 years ago
New Features:
new
expression.Misc:
minimal_merge
flagParser:
new
expressions optionalPublished by facebook-github-bot over 4 years ago
New Features:
unsafe-addition
, which warns if either operand of an addition is null
or void
Breaking change:
flow autocomplete --json
no longer includes location information. This might affect some IDE integrations which have not yet updated to Flow's LSP server. The LSP integration is unaffected.Misc:
dir
field to the Document
libdef (Thanks, @lukeapage!)Published by facebook-github-bot over 4 years ago
file_watcher_timeout
.flowconfig option and --file-watcher-timeout
argument to flow start
and flow server
, which defaults to 120 seconds.Published by facebook-github-bot over 4 years ago
Notable bug fixes:
$Diff
and other type destructors when applied to unions.Misc:
Symbol
from libdefs in favor of symbol
.fs.promises.mkdir
(thanks @gabrielrumiranda!)Published by facebook-github-bot almost 5 years ago
Notable bug fixes:
Published by facebook-github-bot almost 5 years ago
New Features:
Misc:
Array.prototype.flat
(#8237, thanks @nnmrts!).empty
rather than any
.Parser:
>
and }
in JSX child text is a parse error.Published by facebook-github-bot almost 5 years ago
Likely to cause new Flow errors:
symbol
in non-strict equality as other primitive types (example). We allow for non-strict equality checks between two symbol types, and between a symbol and null/void (example).non-array-spread
lint, and replaced it with a new .flowconfig option, babel_loose_array_spread
.Notable bug fixes:
$Exact<T>
failed when T
resolved to a Shape<T>
. [example]Misc:
tool add-comments
by
flowlint-next-line
instead of adding full $FlowFixMe
suppressions on lints, andPublished by facebook-github-bot almost 5 years ago
Likely to cause new Flow errors:
if (x?.y)
and if (x?.y === 42)
understand that x
is truthy in the consequent. Flow also now refines subexpressions of optional chains. For example, given obj?.fun(obj.value)
, the second obj
is known to be truthy since it is only reachable if the earlier obj?.fun
is also truthy; therefore, you don't need to optional-chain it again (obj?.value
).New Features:
symbol
! Note that just like number
is not a Number
, and vice versa, symbol
is not a Symbol
. In the core lib defs, we change usage of Symbol
to symbol & Symbol
. Eventually, it will just be symbol
. The symbol & Symbol
is temporary for one version to allow for existing usage of the : Symbol
to be codemodded to : symbol
.Bug fixes:
$ElementType
, that led to printing empty
instead. This improves hover tooltips.Published by facebook-github-bot almost 5 years ago
Bug fixes:
signature-verification-failure
) out when running flow check-contents
Parser:
export default class implements Foo {}
[example]
Library definitions:
navigator.mediaDevices.getUserMedia
(thanks @thecotne)InputEvent
to removeEventListener
ServiceWorkerContainer.getRegistration
Misc:
module.system.node.main_field
option (see #8128 for more details)Published by facebook-github-bot almost 5 years ago
Likely to cause new Flow errors:
New Features:
ambiguous-object-type
lint warning against use of {}
object types (prefer {||}
or {...}
instead, even when exact-by-default
is enabled).Notable bug fixes:
unclear-type
lint errorMisc:
useDeferredValue
and useTransition
to React library definitionsbytesWritten
funciton to library definition (thanks @farzonl)Published by facebook-github-bot almost 5 years ago
Notable bug fixes:
Published by facebook-github-bot almost 5 years ago
Notable bug fixes:
Published by facebook-github-bot almost 5 years ago
New features:
module.system.node.root_relative_dirname
to allow you to configure where root relative paths resolve toNotable bug fixes:
Published by facebook-github-bot almost 5 years ago
Likely to cause new Flow errors:
New features:
experimental.minimal_merge
) that speeds up rechecks when the experimental types-first mode is in use. This flag will be turned on by default and then removed in future releases.experimental.allow_skip_direct_dependents
by default. The flag will be removed next release. This flag speeds up rechecks when the experimental types-first mode is in use.Notable bug fixes:
module.system.node.resolve_dirname=.
. For those who relied on this bug to import modules using root-relative paths, you can now use module.system.node.allow_root_relative=true
. See #8156 for more details.Misc:
flow status
, flow check
, etc. to choose character offset styleParser:
Published by facebook-github-bot about 5 years ago
Notable bug fixes:
all=true
in the .flowconfig
Published by facebook-github-bot about 5 years ago
New Features:
experimental.disable_live_non_parse_errors=true
to the [options]
section of your .flowconfig
.Notable bug fixes:
[declarations]
configuration in the presence of dependency cycles (thanks @STRML!)Misc:
--evaluate-type-destructors
to type-at-pos
command.--evaluate-type-destructors
and --expand-type-aliases
to dump-types
command (thanks @goodmind!)proceses.env
values from ?string
to string|void
(thanks @FireyFly!)*
typePublished by facebook-github-bot about 5 years ago
Likely to cause new Flow errors:
delete
, but now doesObject.defineProperty
and similar methods now adhere more closely to the specNotable bug fixes:
$NonMaybeType<mixed>
no longer includes null and undefined (Thanks @goodmind)Misc:
$Supertype
and $Subtype
utilities are now removed entirelyPerformance:
Library Definitions
HTMLStyleElement.sheet
type (Thanks @kof)AsyncIterator
to node.js
(Thanks @goodmind)undefined
to prelude (Thanks @goodmind)Published by facebook-github-bot about 5 years ago
Notable bug fixes:
$ObjMap
, $ObjMapi
, $TupleMap
, and $Call
with incorrect arity.Misc:
flow ide
command and associated machinery have been removed.Library definitions:
undefined
to the prelude.Published by facebook-github-bot about 5 years ago
New Features:
Notable bug fixes:
%checks
(#7863).Misc:
textDocument/documentHighlight
request serviceable while Flow is in the middle of a recheck.--traces
flag.undefined
is involved.flow lsp
is started while the server is initializing.Library Definitions: