5 ms·
I wouldn't call this a macro system. It's a preprocessor for another language that is transpiled to typescript. A ts macro system would be integrated with ts l
by amitport 3y ago
I wouldn't call this a macro system. It's a preprocessor for another language that is transpiled to typescript.
A ts macro system would be integrated with ts language service and tsc. As a compile time language, the main advantage of tsc is, well, developer experience, which, unless I'm missing something, gets thrown out the door here.
Also, the demo includes very weak use cases, much of it could be done directly with js functionality without the additional macros. It's not clear to me how much effort and computation time does this saves.
- eyelidlessness 3y agoAgree. It’s template TS, which is why I shied away from it when I first encountered it. I do think it has some language service support FWIW, but I don’t want even more new arbitrary syntax in a constantly churning language. I do want TS macros, I just want them to be compile time functions over existing syntax with, well… lisp but I can’t have that.
- paulddraper 3y agoTypeScript has plugins now, so that would be possible?