Writing / tag
#typescript
TypeScript settings, compiler versions and the features that trip people up. 5 posts, newest first.

TypeScript 7: What Breaks Is the API, Not Your Code
4 min read
TypeScript 7's native tsc type-checked my apps six to nine times faster and flagged nothing new. What broke was every tool that imports the compiler: the typescript package no longer ships the JavaScript API. One repo moved; this blog can't yet.

Turn on skipLibCheck
6 min read
skipLibCheck in tsconfig skips type-checking .d.ts files, so tsc spends its time on your code. Turn it on (tsc --init already does) and leave it on in CI.

Use ESM
6 min read
JavaScript has a standard module system, and new code should use it. Here is how Node decides whether a file is ESM or CommonJS, where CommonJS still matters, and why AMD and UMD are history.

Prefer Named Exports
4 min read
Named exports vs default exports: a default import can be called anything, so names drift. A named export keeps one name, and TypeScript renames it.

TypeScript Has Two Decorator Systems
5 min read
Standard decorators take (value, context) and need no tsconfig flag. experimentalDecorators switches you back to the 2015 design. The two are not compatible, so pick one on purpose.