Today TypeScript 5.8 Beta ships the new "erasableSyntaxOnly" flag 🎉
It is designed to pair with Node's built-in TypeScript support, guiding users away from TS-only runtime features such as:
❌ enum
❌ runtime namespace
❌ parameter properties
Remember: TS = JS + Types 👍
It is designed to pair with Node's built-in TypeScript support, guiding users away from TS-only runtime features such as:
❌ enum
❌ runtime namespace
❌ parameter properties
Remember: TS = JS + Types 👍
Reposted from
Rob Palmer
TypeScript 5.8 Beta is released 🎉
🔶 "nodenext" gets require(ESM)
🔶 "nodenext" deprecates Import Assertions
🔷 Checked Conditional Return Types
🔷 erasableSyntaxOnly flag for Node
🔷 Perf: libReplacement flag
🔷 Perf: Program load/update optimizations
🔶 "nodenext" gets require(ESM)
🔶 "nodenext" deprecates Import Assertions
🔷 Checked Conditional Return Types
🔷 erasableSyntaxOnly flag for Node
🔷 Perf: libReplacement flag
🔷 Perf: Program load/update optimizations
Comments
Thanks to @searyanc.dev for implementing this feature 👍
@mattpocock.com's excellent explainer article is here:
https://www.totaltypescript.com/erasable-syntax-only
I wrote some related stuff about enums here:
https://www.reddit.com/r/javascript/comments/1id1ctp/comment/m9whz0q/