Hacker News new | past | comments | ask | show | jobs | submit login

JSX is also not TS at all, yet it gets preferential treatment (TSX). Unlike JSX/TSX, the TypeScript used by Vue is just TypeScript - wrapped in a tag next to some other stuff, so you know where the part you need to type check starts and where it ends. All TS needs to do to support this, on a basic level, is ignore the non-TS parts, i.e. let you turn each non-TS line into a comment.

But no, even adding supported extensions to the compiler, that's right, not even formats, just making TS recognize a new extension as a file that it can load code from, is a no-go; a pre-load hook is the simplest thing to add, had they not made it explicitly, intentionally non-extensible.

I didn't even have time to get into the "stacking of language servers" (something that can and should be as simple as a pipe, and of course Microsoft has all the reasons to make it the opposite of that). So the Volar people literally had to monkey patch Node's the standard library and edit TSC's source on the fly to make anything, work, at all.

It all just goes downhill from there. Designing good APIs is hard enough - having to design them around the arbitrary barriers of some Microsoft boffins who decided to add a complex type system to a language which desperately needs a simple macro system - and took 10 years to do a shit tier job - oh, such an enlightening experience! Let's just say that I have become acutely aware that during the past year I have, well, degraded. As a person. And I literally attribute about 50% of that degradation to my ill-advised choice to do my work in TypeScript. Because like everyone I thought "hey, it's just a superset of JS, can't be that bad..."




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: