Comment

Comment by tonyg

> We can't change the parser

Aw :-(

That's the bit that I'd really like to have TS macros for!

My own approach has been to loosely parse input as something like D-expressions, transform that, and pipe the result into the TS compiler. Crude but effective. The trickiest part is extending the tsserver support, but even this is doable.

parent tonyg 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton