Latest article
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.
Types / boundaries / better code
A blog about TypeScript in production software, focused on the practical context of using the language in real applications.
Latest article
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
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
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 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
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
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
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
Use `tsx watch` for a repeatable development command, then run type checking and compiled JavaScript as separate checks.
Configure, migrate, and verify projects
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
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.
Keep the next useful detail within reach.
Follow via RSS