Skip to main content
Zubin KhavarianZubin Khavarian

Writing

RSS

Notes on front-end work, TypeScript, and the overlap with games and audio: skipLibCheck in tsconfig, ES modules, and ink outlines without a separate pass.

Turn on skipLibCheck

5 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.

#javascript#typescript

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.

#javascript#typescript

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.

#javascript#typescript

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.

#javascript#typescript

Get new posts by email

One short email when a post goes out, about once a week. Unsubscribe any time.

Or follow along:RSSGitHubX

zubin@zubin.dev: man keys

// go to

  • ghhome
  • gwwriting
  • gaapps
  • gpprojects
  • goopen source
  • gnnow
  • guuses

// move

  • jscroll down
  • kscroll up
  • ggtop of page
  • Gbottom of page
  • }next section (posts)
  • {previous section (posts)
  • ]newer post
  • [older post

// do

  • ⌘Ksearch everything
  • /search, too
  • ttoggle light / dark
  • ?this sheet
  • escclose