All topics
General · Learning hub

TypeScript cheat sheet & developer notes

TypeScript cheat sheet and 8 curated developer notes — core concepts, patterns, and interview prep. Maintained by the DevRecall team.

Save this stack to your DevRecallTest yourself — TypeScript quizMore General notes
01 · TypeScript

Type System & Annotations

TypeScript Type System & Annotations. TypeScript extends JavaScript by adding static type definitions. Types provide a way to describe the shape of objects, enabling better documentation and error detection.. Basic Types…

Read
02 · TypeScript

Interview Questions

TypeScript Interview Questions. Comprehensive TypeScript interview questions covering type system, generics, utility types, and best practices:. Fundamentals. 1. What is TypeScript?. TypeScript is a typed superset of Jav…

Read
03 · TypeScript

Advanced Types (Generics & Utility Types)

TypeScript Advanced Types. Generics. // Generic function function identity<T>(arg: T): T { return arg; } const num = identity<number>(42); // Explicit const str = identity('hello'); // Inferred // Generic with constraint…

Read
04 · TypeScript

Decorators & Metadata

TypeScript Decorators & Metadata. Decorators provide a way to add annotations and meta-programming syntax for class declarations and members. They are functions that modify classes and their members.. Class Decorators. /…

Read
05 · TypeScript

Configuration & Best Practices

TypeScript Configuration & Best Practices. tsconfig.json Essentials. { "compilerOptions": { // Language version "target": "ES2022", "lib": ["ES2022", "DOM"], // Module system "module": "ESNext", "moduleResolution": "bund…

Read
06 · TypeScript

Type Guards & Narrowing

TypeScript Type Guards & Narrowing. Type Narrowing. // typeof narrowing function padLeft(value: string, padding: string | number) { if (typeof padding === 'number') { return ' '.repeat(padding) + value; } return padding …

Read
07 · TypeScript

Advanced Patterns

TypeScript Advanced Patterns. Conditional Types. // Basic conditional type type IsString<T> = T extends string ? true : false; type A = IsString<string>; // true type B = IsString<number>; // false // Practical example t…

Read
08 · TypeScript

Enums & Literal Types

TypeScript Enums & Literal Types. Enums. Enums allow you to define a set of named constants, making it easier to document intent and create distinct cases.. // Numeric enum enum Direction { Up, // 0 Down, // 1 Left, // 2…

Read

Keep your TypeScript knowledge sharp.

Save this stack to your personal DevRecall — add your own notes, track what you're learning, and share what you know with the community.

Get started — free forever