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 likethis.#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 theFoo
module) - The
file_watcher.watchman.survive_restarts
setting is nowtrue
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 tofalse
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)