Typescript Update
Announcement / Release Note)
Announcement / Release Note)
- ES2020
- Optional Chaining (
let x = foo?.bar.baz();
) - Nullish Coalescing operator (
let x = foo ?? bar();
)
- better handling of JS & d.ts generation (
--declaration
and --allowJs
) - Recursive Type Aliases
- Uncalled Function Checks (e.g. user
user.isAdministrator
instead of user.isAdministrator()
) - Flatter Error Reporting
Announcement / Release Note)
- Type-Only Imports and Exports (
import type { SomeThing } from "./some-module.js"; export type { SomeThing };
) - ES2020
- ECMAScript Private Fields (⚠️ Use WeakMaps / only supported by Chromium + Safari 14.1 (~ 70%))
Announcement / Release Note)
Breaking changes : 4.0.0 & 4.0.1