What is Type Assertion in TypeScript

In TypeScript, Type Assertions allow developers to explicitly specify the type of a variable to the TypeScript compiler.  When the compiler cannot infer the type of a variable and the developer is more sure about the type, they can use a type assertion. Type assertions are a compile-time construct that does not result in runtimeContinueContinue reading “What is Type Assertion in TypeScript”