Announcing TypeScript 5.3
Today we’re excited to announce the release of TypeScript 5.3!
If you’re not familiar with TypeScript, it’s a language that adds type syntax to JavaScript to bring type-checking. Type-checking can catch all sorts of issues like typos and forgetting to check for
null
andundefined
. But types go beyond type-checking – the same analyses of TypeScript’s type-checker are used for rich editor tooling like auto-completion, code navigation, and refactorings. In fact, if you’ve been writing JavaScript in editors like Visual Studio or VS Code, that experience is powered by TypeScript!To get started using TypeScript, you can get it through NuGet, or through npm with the following command:
npm install -D typescript
Here’s a quick list of what’s new in TypeScript 5.3!
- Import Attributes
- Stable Support
resolution-mode
in Import Typesresolution-mode
Supported in All Module Modesswitch (true)
Narrowing- Narrowing On Comparisons to Booleans
instanceof
Narrowing ThroughSymbol.hasInstance
- Checks for
super
Property Accesses on Instance Fields- Interactive Inlay Hints for Types
- Settings to Prefer
type
Auto-Imports- Optimizations by Skipping JSDoc Parsing
- Optimizations by Comparing Non-Normalized Intersections
- Consolidation Between
tsserverlibrary.js
andtypescript.js
- Breaking Changes and Correctness Improvements
TypeScript 5.3 has been released.