Declaration Files and Publishing Types Other People Will Actually Use
How .d.ts files, module augmentation, and package.json exports maps work together, and the mistakes that quietly break your library's consumers.
Tag
7 articles
How .d.ts files, module augmentation, and package.json exports maps work together, and the mistakes that quietly break your library's consumers.
Why the legacy Date object keeps causing bugs, what Temporal's PlainDate, ZonedDateTime, and Instant types fix, and how to plan a real migration.
A practical tour of the regex features worth mastering — named groups, lookaround, sticky matching, Unicode properties — and when to reach for a parser instead.
How WeakMap, WeakRef, and FinalizationRegistry actually work, where each one earns its place, and why most of them belong in library code, not app code.
A practical look at where ESM and CommonJS interop still breaks in 2026, and how to pick a module format for a new library or app without regret.
A practical guide to choosing between Promise.all, allSettled, race, and any, with the failure modes each one is actually designed to handle.
A precise walkthrough of how the JS event loop orders microtasks and macrotasks, with the interleaving bugs that actually bite in production code.