Glint Deep Dives ↩︎

A 6-part YouTube explainer series digging deep into Glint!

Assumed audience: Software developers interested in how programming language tooling in editors works, especially (but not only!) for TypeScript.

For the past six weeks or so, my long-time collaborator Dan Freeman and I have been working through a deep dive on Glint: the tool we (mostly Dan!) built over the past many years to provide type safety for Embers template language. In this six-part (!) series, we cover everything from the high-level architecture to the nitty-gritty details of how Glint compiles Ember’s Handlebars-style templates into something TypeScript can understand, and from the CLI to the language server integration.

There is, as far as I know, nothing like this kind of detailed deep dive for any other language server out there, so I hope that it is interesting not only to the Ember community but to other people who want to do similar work for other frameworks, languages, etc.! This also highlights (1) how much things like Rich Harris’ old HTMLx idea would be super valuable for all the non-JSX view layers out there and (2) how nice it would be if TypeScript provided a better interface for those view layers to use.

I think TSX is an under appreciated part of the success of React; it is notable just how much effort every other front-end framework has had to put into building and maintaining their own versions of what React (and other JSX/TSX tools) get for free” from TypeScript. I totally understand why the TS team does not want a general-purpose pluggable architecture for this kind of thing. At the same time, I think there is a real need here, and the sheer amount of duplicated work across Glint, Volar, Svelte Language Tools, etc. is evidence of that.

Medium-term, my own long-baked take is that the JS/TS community should push for both (a) a shared standard syntax — which means a lot of folks on frameworks will need to actually compromise to get there! — and (b) support for that single shared syntax from TypeScript. Having a single shared syntax for HTML semantics templates” would go a very long way to alleviating the very real concerns about a general plugin/extension architecture from the TypeScript team! It would also dramatically decrease the learning curve for the JS community!