Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

v0.200.0

Compare
Choose a tag to compare
Loading
@facebook-github-botfacebook-github-bot released this 16 Feb 06:20
· 4095 commits to main since this release

Likely to cause new Flow errors:

  • We now require all generic functions to be fully annotated to preventgeneric-escape issues. Some escaped-generic errors will be removed withmissing-local-annot errors on return type annotation positions.
  • Under LTI, we will no longer silently give unannotated parameters in destructuring assignmentany type. Instead, they will be properly contextually typed. e.g.try Flow example.
  • Some additional errors might be revealed after a correctness fix in implicit instantiation. e.g.try Flow example
  • Theexact_by_default option is now required to be set in the[options] section of the.flowconfig. Add eitherexact_by_default=true orexact_by_default=false to your[options] section. Previously the absence of the option was equivalent toexact_by_default=false. In the future, we will make the absence of the option equivalent toexact_by_default=true. Read more about the option here:https://flow.org/en/docs/config/options/#toc-exact-by-default-boolean. To create a valid new.flowconfig, useflow init.
  • Changes to type variable unification may cause new errors to surface or old errors to be shifted to new locations.
  • Fixed a bug where an unannotated parameter does not cause amissing-local-annot error under LTI. e.g.try Flow example
  • Flow will stop emitting some spurious errors and uncover some hidden bugs under local type inference, as a result of removing a cache that no longer makes sense.
  • Thethis type of exported classes' methods are no longer unsoundly typed asany. As a result, more underconstrained implicit instantiation errors might show up in LTI.
  • Relational comparisons between dates and numbers are no longer allowed.

New Features:

  • We addedflow autofix missing-local-annot command that will try to add annotations to autofix allmissing-local-annot errors in a given file.
  • We now provide autofixes in IDE for allmissing-local-annot errors where we can locally infer a type. Previously, this kind of autofix is only provided for unannotated parameters.
  • Added anunused-promise-in-sync-scope lint which will detect unused promises in sync scopes (likeunused-promise-in-async-scope does for async scopes). Enablingunused-promise will enable both of these rules. The individual rules will be removed in a future release.
  • Pragmas (e.g.// @flow strict,// @jsx custom_jsx_fun) are now supported in try-flow.

IDE:

  • Added autocomplete for jsdoc comments on functions.
  • Added autocomplete for$FlowFixMe comments.
  • Autocomplete will no longer suggest existing type names for type binding identifiers (e.g., in the name of a type alias).

Notable bug fixes:

  • We will no longer warn aboutmissing-local-annot when there is a proper typing context insuper call. e.g.super(x => x) will now pass type checking under LTI if the super constructor call expects such function.
  • Builtin types like$ReadOnly will no longer shadow your local definitions with the same name.
  • We will no longer emit spurious errors when we are doing contextual typing while trying to resolve an overload. e.g.try Flow example
  • We fixed a bug that over-zealously uses contextual type information from sibling nodes to type generic function calls. As a result, examples like the following no longer error:try Flow example
  • fixed a bug where optional chaining on a value typed as a type application would not filter out the null or undefined value. e.g.try Flow example
  • Some spurious errors might be removed as a result of Flow doing proper cache invalidation.
  • Fix sorting of auto-imports with the same similarity score and length.

Parser:

  • Parse and error on JSX type arguments.
  • Add custom parse error for abstract classes.
  • Add custom parse error when attempting to use template literal types in Flow.
  • Add custom parse errors for TS class visibility modifiers public/private/protected.
  • Removefunction as an alias toFunction, and don't allowfunction as a type name in general. (closesissue #9000).
Assets9
Loading
mrtnzlml reacted with thumbs up emojimrtnzlml, NoahTheDuke, and philipheinser reacted with hooray emojimrtnzlml reacted with heart emojimrtnzlml reacted with rocket emoji
3 people reacted

[8]ページ先頭

©2009-2025 Movatter.jp