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.
`userId!`
to
`if (!userId) throw new Error('Non-Null Assertion Failed "userId!"')`