Adds static typing to JavaScript to improve developer productivity and code quality.
MIT License
Bot releases are visible (Hide)
Published by facebook-github-bot about 4 years ago
Likely to cause new Flow errors:
Notable bug fixes:
Requires_not_found
or Sig_requires_not_found
.Misc:
propTypes
to React.AbstractComponentStatics
(thanks @brianzchen).Published by facebook-github-bot about 4 years ago
Published by facebook-github-bot about 4 years ago
Likely to cause new Flow errors:
types_first=false
in a flowconfig if desired. See https://medium.com/flow-type/types-first-a-scalable-new-architecture-for-flow-3d8c7ba1d4eb for more about types-first.New Features:
file_watcher.watchman.mergebase_with
flowconfig option and --file-watcher-mergebase-with
CLI option to choose a tracking bookmark for Watchman to compute the mergebase against.Misc:
Published by facebook-github-bot about 4 years ago
Likely to cause new Flow errors:
New Features:
Notable bug fixes:
flow focus-check
when a focused file has a syntax error.Misc:
null-void-addition
lint now that it has been subsumed by an ordinary type error.export *
itemType
and inlineDetail
fields from the LSP completionItem
implementation.Published by facebook-github-bot about 4 years ago
Likely to cause new Flow errors:
New Features:
Notable bug fixes:
Misc:
Published by facebook-github-bot about 4 years ago
module
in ES modules when well_formed_exports
is enabled.types_first=true
) when using well_formed_exports.include
. For types-first to function properly, the entire project's exports must be well-formed, not just specific paths.--types-first
on the command line overrides well_formed_exports=false
in .flowconfig
. This makes it easier to test types-first mode.unsafe-addition
lint now defaults to being an error. It will be converted from a lint to a type error in the future.dynamic-export
lint which does not work in types-first modePublished by facebook-github-bot over 4 years ago
New Features:
module.exports = ...
to the actual definition.Library Definitions:
offset
an optional argument for the sized Buffer read/writes (thanks @isker!)Misc:
includes
/excludes
instead (see updated docs: for Types First and flowconfig options).Published by facebook-github-bot over 4 years ago
Likely to cause new Flow errors:
Notable bug fixes:
Misc:
cast
and isValid
to take in optional representation type for enumsPublished by facebook-github-bot over 4 years ago
New Features:
default
were exported with export default
syntax.Library Definitions:
Parser:
Config:
Published by facebook-github-bot over 4 years ago
Misc:
Library Definitions:
Published by facebook-github-bot over 4 years ago
.flowconfig
or package.json
and then running flow status
would get stuck in a restart loop, if using lazy mode with Watchman and Mercurial.Published by facebook-github-bot over 4 years ago
window/showStatus
responsesHeadersInit
and signal
to Fetch API (thanks @andretshurotshka!)replace
method to DOMTokenList
(thanks @w01fgang!)Published by facebook-github-bot over 4 years ago
Publishing of flow-bin
v0.125.0 failed to include the binaries. Oops!
Likely to cause new Flow errors:
any
.New features:
Notable bug fixes:
empty
in some circumstances.Misc:
$FlowIssue
and $FlowExpectedError
as default suppression comments.type-at-pos
and friends.Parser:
type
keyword in type aliases.Library definitions:
thisArg
parameter for array callback functions (e.g. map
, reduce
) to mixed
.Array.flat
.Library Definitions:
StorageEvent
overloads.Misc:
textEdit
in identifier completion item responses over the LSP, to avoid possible behavior differences with different LSP clients.Parser:
flow-dev-tools
:
update-suppressions
subcommand.Published by facebook-github-bot over 4 years ago
New Features:
react.runtime
flowconfigautomatic
the transform auto-imports jsx (the replacement forcreateElement
) under a fresh name (unique of all existing names in the source).classic
it will continue transpiling jsx to React.createElement
.Notable bug fixes:
$Exact<T|U>
as $Exact<T>|$Exact<U>
. Before, when we checked$Exact<T> & $Exact<U>
, instead.Misc:
$Exports<'m'>
will now lookup module 'm' directly in builtins, instead of theParser:
Published by facebook-github-bot over 4 years ago
Likely to cause new Flow errors:
Moved react-dom
modules out of built-in libdefs. They are now available on flow-typed.
To install the libdefs, run flow-typed install --flow-version=0.122.0 [email protected]
This diff is necessary to allow React to make breaking changes to react-dom without force-pinning Flow users to the latest version of react-dom.
Fixed an unsoundness in union and intersection spreads
Improved object spread-related error messages, which may cause suppressed errors to become unsuppressed because they moved to better locations
Improved Editor Integration:
f<tab>
might complete foo(aParam)
, which is problematic if you don't want to call the function. Now it just completes foo
. These snippets are further obviated by signature help, which appears when you type (
.export { HERE } from ...
)Misc:
HTMLUnknownElement
and support for custom elements to document.createElement
(thanks @YevhenKap!)--saved-state-no-fallback
flag so that Flow exits when saved state is not foundexperimental.types_first
now implies experimental.well_formed_exports
Parser:
Published by facebook-github-bot over 4 years ago
Highlights:
Misc:
add-comments
script to add comments on JSXText
.flow
files without @flow
Lib defs:
url.parse
function (thanks @chicoxyzzy)console
methods (thanks @goodmind)Element.hasAttributes()
string
index to NamedNodeMap
Element.querySelector()
and Element.querySelectorAll()
overloadsPromise.allSettled()
Published by facebook-github-bot over 4 years ago
Likely to cause new Flow errors:
$Shape
types now carry more information about the locations of errors that involve them, which may invalidate old suppressions.any
-typed values are now refined by primitive typeof
checks (example).New Features:
"Did You Mean?" IDE feature that suggests corrections to your code as you type. For example, if you write foo.bar on an object foo that doesn’t have a field named bar but does have a field named baz, the quick fix will apply that suggestion.
declare
can now be used on class fields. When Flow implemented the class fields proposal, uninitialized class fields (e.g. class C { foo }
) were not allowed, so we used that syntax for type-only declarations (class C { foo: string }
). Since then, they now are initialized to undefined
and Babel 8 will start to leave them. To maintain existing behavior, change uninitialized fields to use the declare
keyword, signalling to Babel that they should be stripped (class C { declare foo: string }
).
Notable bug fixes:
type-at-pos
and signatureHelp
Misc:
Notification
to have read-only fieldsPublished by facebook-github-bot over 4 years ago
Likely to cause new Flow errors:
$Shape
types now carry more information about the locations of errors that involve them, which may invalidate old suppressions.any
-typed values are now refined by primitive typeof
checks (example).New Features:
"Did You Mean?" IDE feature that suggests corrections to your code as you type. For example, if you write foo.bar on an object foo that doesn’t have a field named bar but does have a field named baz, the quick fix will apply that suggestion.
declare
can now be used on class fields. When Flow implemented the class fields proposal, uninitialized class fields (e.g. class C { foo }
) were not allowed, so we used that syntax for type-only declarations (class C { foo: string }
). Since then, they now are initialized to undefined
and Babel 8 will start to leave them. To maintain existing behavior, change uninitialized fields to use the declare
keyword, signalling to Babel that they should be stripped (class C { declare foo: string }
).
Notable bug fixes:
type-at-pos
and signatureHelp
Misc:
Notification
to have read-only fields