All notes
Every note published on TypeScript in Production
Share and publish package APIs
What TypeDoc Includes from a TypeScript Entry Point
Use a library entry point’s exports to predict which declarations TypeDoc will represent, then check the result and its extracted comments.
Choose execution and state ownership
Awaiting Async Work in TypeScript Loops: Choose Sequential `for...of` or Concurrent `Promise.all`
Use `for...of` when each operation must finish before the next starts; use `Promise.all` for independent operations, while accounting for its rejection behavior.
Share and publish package APIs
Create a TypeScript npm Package That Publishes JavaScript and Declarations
Build a CommonJS-only TypeScript library, package its JavaScript and declarations, and check both entry points from a separate consumer.
Choose execution and state ownership
Choose TypeScript or Python for a Backend Service: Workload, Contracts, and Ownership
Choose the language around the service’s defining dependencies, then account for runtime validation, contract ownership, and the cost of operating another service.
Choose execution and state ownership
TypeScript Classes vs Modules: Should State Belong to an Instance or a File?
Use a class when callers need independently changing state; use a module to group operations and control what other files can import.
Validate data at runtime and across boundaries
Model a TypeScript API Contract: Requests, Responses, and the Network Boundary
Define one user-update contract for a handler and client, then check actual request and response data before trusting its types.
Represent and transform application data
TypeScript Pick vs Extract: Select Properties or Union Variants
Use Pick to select fields from a type, Extract to retain matching union members, and Extract before Pick when the fields belong to only one variant.
Configure, migrate, and verify projects
Run a TypeScript Development Script with `tsx` and npm
Use `tsx watch` for a repeatable development command, then run type checking and compiled JavaScript as separate checks.
Configure, migrate, and verify projects
Initialize a TypeScript npm Project and Verify Strict Checking
Install TypeScript locally, configure a small Node.js project, and use an implicit-any error to check that strict settings apply to its source.
Represent and transform application data
TypeScript Mapped Types: Reuse and Transform Interface Properties
Use Pick to retain selected interface properties and their types, Partial to make them optional, and a mapped type when every property needs a new value type.










