github facebook/flow v0.202.0

latest releases: v0.246.0, v0.245.2, v0.245.1...
18 months ago

Likely to cause new Flow errors:

  • Don't error for tuple element type incompatibility if we have already errored for invalid tuple arity.
  • Fix a bug that causes certain errors in annotations to be hidden. As a result, more legitimate errors might appear. Example here.

New Features:

  • Add support for optional tuple elements, e.g. ['s'] and ['s', 1] are both valid values for [foo: string, bar?: number].
  • Add autocomplete for keywords to the LSP.
  • Add a code action that inserts jsdoc on a function.
  • exact_by_default=true is now the default value if the option is omitted from the .flowconfig. Read this blog post for more details.

Notable bug fixes:

  • Fix LSP rename command to consider aliased named exports.
  • If a contextually typed parameter has a default, we will filter out null and void from the inferred type of the parameter. This removes spurious errors like this.
  • Some spurious prop-missing errors might be removed. Example here
  • Remove some spurious internal errors of Flow. Example here

Misc:

  • Add option for module.system.haste.module_ref_prefix_LEGACY_INTEROP in the config to allow migration from the automatic_require_default flag and to ES module syntax.

Parser:

  • Include InterpreterDirective in the AST.
  • Fix loc/range of postfix arrays that start with a parenthesis, like (A | B)[].
  • Fix missing error when arrow functions have duplicate params.

Don't miss a new flow release

NewReleases is sending notifications on new releases.