Typescript terms
JavaScript with a safety net and a much better IDE experience
TypeScript adds a powerful static type system to JavaScript, catching errors at compile time and making large codebases dramatically easier to maintain and refactor. This category covers type primitives, generics, utility types, declaration files, strict mode, and the patterns that make TypeScript an upgrade rather than just added ceremony.
Variance describes how subtype relationships on a type's components affect subtype relationships on the whole type — covariant types follow the direction, contravariant types reverse it.
4w ago
typescript advanced
Module augmentation lets you extend third-party or global type definitions without modifying their source — adding properties to existing interfaces, modules, or the global scope.
4w ago
typescript advanced
Types that reference themselves to describe arbitrarily nested structures — trees, nested menus, JSON, linked lists — without requiring any escape hatch.
4w ago
typescript advanced
Branded / Opaque Types in TypeScript
A technique to make structurally identical types incompatible — a UserId and an OrderId are both strings, but branding makes them distinct types so passing an OrderId where UserId is expected is a compile-time error.
2mo ago
typescript advanced
infer Keyword in Conditional Types 2.8
The infer keyword inside conditional types lets TypeScript extract and name a type from within a generic structure — enabling ReturnType<T>, Awaited<T>, and custom type extraction.
2mo ago
typescript advanced
using & await using (TS 5.2 Explicit Resource Management) 5.2
TypeScript 5.2 using keyword automatically disposes resources (DB connections, file handles) when they go out of scope — like C# using or Python with.
2mo ago
typescript advanced
Template Literal Types 4.1
TypeScript template literal types combine string literals with type interpolation — type EventName = `on${Capitalize<string>}` — enabling precise string-pattern type constraints.
2mo ago
typescript advanced
Conditional Types & infer 2.8
Types that choose between two types based on a condition — T extends U ? X : Y — enabling type-level branching. The infer keyword extracts types from within a conditional.
2mo ago
typescript advanced
Mapped Types & Template Literal Types 2.1
Mapped types transform existing types by iterating over their keys. Template literal types create string union types from combinations — together they enable powerful type-level transformations.
2mo ago
typescript advanced
TypeScript Declaration Files (.d.ts) 2.0
Type-only files describing JavaScript code shapes — DefinitelyTyped (@types/* packages) provides community-maintained declarations for popular JS libraries.
2mo ago
typescript advanced
TypeScript Decorators 4.0
Metadata annotations on classes, methods, and properties — used in NestJS, Angular, TypeORM, and class-validator to attach behaviour declaratively.
2mo ago
typescript advanced
Type parameters that allow functions, classes, and interfaces to work with any type while preserving type information — the TypeScript equivalent of PHP templates or Java generics.
2mo ago
typescript advanced