News for hackers. Stuff that matters.
Re:Macro-ts: TypeScript compiler with typesafe syntactic mac... by mfbx9da4 on Tuesday May 30, 2023 @05:16AM (#36122750)
As an aside I think the non-null assertion operator should be transpiled via Babel from

`userId!`

to

`if (!userId) throw new Error('Non-Null Assertion Failed "userId!"')`

Re:Macro-ts: TypeScript compiler with typesafe syntactic mac... by triyambakam on Tuesday May 30, 2023 @05:18AM (#36122767)
I like it, but I think it would violate the rule that TS code is simply erased. Though there are already a few exceptions like enums, but those are out of favor.