Let’s get to the highlights of TS 4.3:
- Separate write types on properties
- Overriding methods
- Template string type improvements
- Error for missing
- Static index signatures
- Improved support for well-known symbols
Will discuss few of them,
1- New override keyword, If you mark a method with override, it’ll check to see if a method with the same name exists in the base class. That prevents common errors that come up when you can’t make it clear whether you meant to add a totally new method or override an existing one. It also comes with a new – noImplicitOverride flag, which gives TypeScript permission to (lovingly) yell at you if you try to override a method without using override.
2- Separate write types on properties, It was always pretty tricky to model APIs that convert passed-in values before storing them, because TypeScript forced you to choose between optimizing for reading values or writing values. But now you can specify types for reading and writing to properties. Best of both worlds.
3- Template String Type Improvements, These are new-ish types that either construct new string-like types by concatenating or they match patterns of other string-like types. TypeScript 4.3 makes a few improvements to how & when TypeScript infers these TSTs.