Type Inference vs. Type Assertion in TypeScript
Two important tools in the TypeScript type system are type inference and type assertion. While they sound similar, they serve different purposes and …
Two important tools in the TypeScript type system are type inference and type assertion. While they sound similar, they serve different purposes and …
Understanding the Difference Between void and never in TypeScript When working with TypeScript, we may encounter various utility types that help …
In version 4.0 TypeScript fixed a ‘bug’ in a try/catch block, where the error was of type any. The any type allowed, well, …
JavaScript does not offer any build in way how to create enums so we have to use a workaround. On the other hand, TypeScript has its way, or two, how …
The ‘const’ assertion was added to TypeScript in version 3.4. It sets all properties of an object to be readonly and arrays becomes …
Function overloading is very common technique in many programming languages. JavaScript itself this feature do not support. But luckily, we have …
To define an array of minimal length we have to create an array of defined length and then extend it with an array of unknown length. Array of certain …