Photo by H C on Unsplash

More articles in this area

Article

Decorators in TypeScript

TypeScript decorators are a way to modify or extend the behavior of classes, methods, or properties in a declarative manner. They are denoted by the @ symbol and are applied using a syntax similar to…

Article

Async generator in TypeScript

TypeScript types async generators with AsyncGenerator, AsyncIterable, and AsyncIterator so yield and for await..of stay checked at compile time. This page covers return types, TReturn/TNext, and typing consumers.

Article

Symbols in TypeScript

TypeScript treats symbol keys as a distinct property kind with unique typing rules. This page shows how to declare symbol properties, narrow objects that carry them, and avoid accidental string-key collisions in typed APIs.

Article

Type Guards in TypeScript

Type Guards are used to check whether you are dealing with a certain type or not. Getting from a more general type to a more specific type is called Narrowing . There are different ways to 'type…

Article

TypeScript installation and configuration

Now you can use the TypeScript compiler running tsc . To test whether a TypeScript file compiles create a simple file:

Article

Utility Types in TypeScript

Utility types let you create types based on other types. Have a look at the official TypeScript page for example about utility types.

Quick Tip

Force a non-empty array in TypeScript

This is how you can force TypeScript to always have at least one item in an array. Or in other words: to not allow empty arrays.

Article

Types in TypeScript

Boolean, Number, String, Array, Enum, Void, Null, Undefined, Never, Any.

Article

Error handling with async/await in TypeScript

TypeScript narrows results when you separate success and failure with typed tuples or Result-like helpers, and it types catch clauses under useUnknownInCatchVariables. This page focuses on typing async error paths—not on try/catch mechanics.

Tags

Search articles

Type a word to search published articles.

Open the search page