github facebook/flow v0.158.0

latest releases: v0.236.0, v0.235.1, v0.234.0...
2 years ago

New Features:

  • Add support for private class methods, implementing both the instance and static proposals! (thanks to our intern, @SamChou19815)
  • Add an "Organize Imports" code action which sorts and groups the imports at the top of the file.
  • Add an "Add all missing imports" code action which auto-imports all unambiguously undefined variables in the given file.

Notable changes:

  • Fix a bug where private class fields like #foo: () => 'foo' could not be called, leading to workarounds like this.#foo.call(this)
  • Fix a crash when hovering over a type annotation that is recursive in a parameter default
  • Fix a crash when autocompleting inside an object literal with a recursive type
  • Fix order of auto-import code actions
  • Fix issue with utility types nested in $NonMaybeType<...>
  • Fix Go to Definition on module reference strings (e.g. if module.system.haste.module_ref_prefix=m#, "m#Foo" will jump to the Foo module)
  • The file_watcher.watchman.survive_restarts setting is now true by default. This setting is deprecated and will be removed in a future version.
  • The --retry-if-init CLI flag has been removed. Setting it to false previously caused the command to error if the server was already running but not yet ready. Instead, use --timeout to avoid waiting too long.

Parser:

  • Significantly improved parser performance
  • Private methods are no longer a parse error

flow-remove-types:

  • Fix to remove variance sigils on class properties (thanks @mischnic)

Don't miss a new flow release

NewReleases is sending notifications on new releases.