Type Assertion in Typescript
· ☕ 2 min read
Typescript’s type assertion features help us to override type inference and indicate a specific type to a variable.
Type assertion may not be the most common of the features you employ, but it is invaluable when you are migrating from Javascript. Or, when you have to interact with Javascript libraries or data from external systems in your Typescript code.