Join Nostr
2025-02-01 17:03:55 UTC

Axel Rauschmayer on Nostr: #TypeScript: Now that I know about type stripping (*), I wish tsc supported it. ...

#TypeScript: Now that I know about type stripping (*), I wish tsc supported it.
Benefit: In npm packages, we could do without JS source maps.
(*) https://2ality.com/2025/01/nodejs-strip-type.html#type-stripping-and-source-maps

===== BEFORE =====
src/
util.ts
dist/src/
util.js
util.js.map
util.d.ts
util.d.ts.map # enables definition-jumping to util.ts

===== AFTER =====
dist/src/
util.js
util.d.ts
util.d.ts.map # points to util.js(?)