TypeScript & Node.js
4 guidesTyped boundaries, Node runtime behavior, and reliable services.
TypeScript Foundations: Narrow Unknown Data Before Trusting It
Distinguish compile-time guarantees from runtime data and use narrowing, discriminated unions, and explicit parsing at service boundaries.
Node.js Foundations: Event Loop Work, Backpressure, and Cancellation
Keep request handlers responsive by distinguishing asynchronous waiting from CPU work, bounding concurrency, and propagating stream failures.
TypeScript results: distinguish absence, invalid input, and dependency failure
Parse unknown data and use discriminated unions to preserve operational meaning through callers.
TypeScript async iterators: connect pull-based demand to resource cleanup
Use for-await consumption, cancellation, and iterator return semantics without hiding queues.