Latest video
Latest posts

Type Checking with Assertion Functions in TypeScript

Best Practices

An assertion function is the implementation of a runtime check that is able to identify the type of unknown input. When the conditions of the assertion functions are passed, TypeScript’s compiler will then assume that the input is of the type claimed by the signature of the assertion function.

Continue reading →

How to use Mapped Types in TypeScript

New Features

TypeScript 2.1 introduced mapped types which allow you to build new types based on the properties of an existing type.

Continue reading →

How to use const assertions in TypeScript

New Features

TypeScript 3.4 introduced const assertions, a feature that allows you to claim a value as immutable. This feature is particularly valuable in combination with array literals, as it prevents new values from being pushed into an existing array.

Continue reading →