Adds static typing to JavaScript to improve developer productivity and code quality.
MIT License
Bot releases are visible (Hide)
Published by facebook-github-bot 11 months ago
New Features:
Notable bug fixes:
declare export
statements in hover and autocomplete. This means that jsdoc for exports in declare module
will finally show up in IDE services.Library Definitions:
USBConnectionEvent
SecurityPolicyViolationEvent
crypto.randomUUID
, http$Server.closeAllConnections
, http$Server.closeIdleConnections
Likely to cause new Flow errors:
React.Fragment
to only accept children and the key prop.React.useRef
to return an opaque type.any
without error.Notable bug fixes:
Performance:
Library Definitions:
IntersectionObserver
types.IndexedDB
transaction now allows consuming storeNames
as DOMStringList
.options
to IndexedDB transaction.durability
to IDBTransaction.Published by facebook-github-bot 12 months ago
Notable bug fixes:
Published by facebook-github-bot 12 months ago
Likely to cause new Flow errors:
| void
Notable bug fixes:
Published by facebook-github-bot 12 months ago
Misc:
Published by facebook-github-bot 12 months ago
Misc:
Published by facebook-github-bot almost 1 year ago
Misc:
Published by facebook-github-bot about 1 year ago
Misc:
Published by facebook-github-bot about 1 year ago
Likely to cause new Flow errors:
React.Element
to be an inexact empty object, effectively making it opaque.React.Element
:export default function DangerouslyAccessReactElementInternals_DO_NOT_USE_IN_NEW_CODE<
E: React$ElementType,
P,
>(e: React$Element<E, P>): {
+key: React$Key | null,
+props: P,
+ref: any,
+type: C,
} {
return e;
}
A
in A extends B ? C : D
is a generic type. This is a behavior change that might cause new errors (example). Previously, we distribute over unions in more cases, which contradicts what we said in the docs, and caused some weird behavior that's fixed in this version.propTypes
, Flow will now emit signature-verification-failure
.New Features:
casting_syntax
option which can be colon
(current), as
, or both
. If setting is both
, both (x: T)
and x as T
are allowed. If set to colon
or as
, only (x: T)
and x as T
are allowed respectively.Notable bug fixes:
Misc:
React.Element
types. Instead, it will insert general types like React.MixedElement
.Library Definitions:
CanvasRenderingContext2D.roundRect
.tagName
to DOM element declarations (thanks @aselbie).Published by facebook-github-bot about 1 year ago
New Features:
--incremental-error-collation
.)Published by facebook-github-bot about 1 year ago
Likely to cause new Flow errors:
$ReadOnly
, which is previously completely unchecked. It also results in Flow complaining about some incorrect bounds. example
New Features:
Notable bug fixes:
obj[m](arg)
.Misc:
Library Definitions:
Array.prototype.findLastIndex()
, String.prototype.at()
, TypedArray.prototype.at()
and Object.hasOwn()
(thanks @pascalduez).URL
defintions (thanks @pascalduez).Published by facebook-github-bot about 1 year ago
This is same as 0.217.1, but we have some issue publishing 0.217.1 to npm, so we will publish this new version instead.
Published by facebook-github-bot about 1 year ago
Notable bug fixes:
experimental.global_find_ref=true
/experimental.global_rename=true
) is ongoing, all other IDE services will be blocked. We fixed it so that other IDE requests can still be served.Published by facebook-github-bot about 1 year ago
Likely to cause new Flow errors:
React.Element
is now opaque, but we still expose some of its internal structure via the bound on the opaque type. You should not depend on the internal structure. In a future release, we plan to make React.Element
truly opaque.forwardRef
and useImperativeHandle
to be write-only. Patterns that rely on refining these params to an object and reading the ref field are misusing these APIs. example
React.ElementProps
is now more precise when applied to AbstractComponent
s, resulting in the config type of the component rather than mixed
. This will cause errors when elements of components with different props are passed into React.Element<>
types.Parser:
typeof
annotations. e.g. typeof MyGenericClass<string, number>
. Type checking for this syntax is still not supported.Library Definitions:
URLSearchParams
definitions (thanks @pascalduez).AbortSignal
definitions (thanks @pascalduez).Array
copying methods (toReversed
, toSorted
, toSpliced
and with
) the $ReadOnlyArray
class definitions (thanks @pascalduez).Published by facebook-github-bot about 1 year ago
Notable bug fixes:
Published by facebook-github-bot about 1 year ago
Likely to cause new Flow errors:
module.system.haste.use_name_reducers=false
is removed. For now this option defaults to true
and can only be set to true
. The option to set the only possible value will be removed in a future release.Notable bug fixes:
Library Definitions:
USB
web API definitions.Published by facebook-github-bot about 1 year ago
Notable bug fixes:
Published by facebook-github-bot about 1 year ago
Likely to cause new Flow errors:
New features:
IDE:
Library Definitions:
Published by facebook-github-bot about 1 year ago
Likely to cause new Flow errors:
$Call
, $ObjMap
, $ObjMapi
, $ObjMapConst
, $TupleMap
. Previously hidden type errors might be revealed now.tuple_ehancements
, conditional_type
, mapped_type
, type_guards
in flowconfig, since these options have been removed. They were enabled by default since v0.212.0.IDE:
Notable bug fixes:
React$AbstractComponent
to match the React.AbstractComponent
type alias in our libdefs. [try-flow]
Library Definitions:
parseArgs
to the Node.js util
module library definitionPublished by facebook-github-bot about 1 year ago
Notable bug fixes: