TypeScript Advanced Types

Parent: TypeScript Expert · Published reference · snapshot 2026-09-08 · skill lang-js-ts/references/typescript-advanced-types.md

↓ Facts as markdownall context files

Expert reference for TypeScript's advanced type system. Covers conditional types, mapped types, branded/nominal types, type narrowing, generic constraints, variadic tuples, template literal types, uti

These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.

TypeScript Advanced Types

When to use this skill

When NOT to use this skill

Scope boundary

Distributive conditional types

The `infer` keyword

`infer` with constraints (TS 4.7+)

Key remapping with `as` (TS 4.1+)

Filtering keys with `as` + `never`

Homomorphic mapped types

3. Branded / Nominal Types

Pattern 2: Unique symbol brand (library-safe)

Pattern 3: Flavor (weaker brand)

Assertion functions (TS 3.7+)

The `satisfies` operator (TS 4.9+)

`const` type parameters (TS 5.0+)

Constraint pattern: `readonly unknown[] | []`

Performance warning

`NoInfer<T>` (TS 5.4+)

`Awaited<T>` (TS 4.5+)

Avoid deep instantiation

Tail-call optimization for recursive types

Practical performance guidelines

Sources

Where this helps

Project ideas

Antipatterns

Known issues

Children

← the whole tree · 3D view· how to read this page