Which means that what looked like a nice WebIDL like in version 1.0 has grown to Haskell level language features by 4.2.
I expect Template TypeScript and Liquid TypeScript are not far off.
My enthusiasm for it has died, and I enjoy just doing a plain old <script src="myfile.mjs"/> on my own projects.
* structural instead of nominal types (i.e. if it walks like a duck and talks like a duck, it is a duck)
* mapped types let you transform object types into other object types: https://www.typescriptlang.org/docs/handbook/2/mapped-types....
* conditional types let you apply conditional type transformations, and combine with mapped types to provide the equivalent of for comprehensions https://www.typescriptlang.org/docs/handbook/2/conditional-t...
* template literal types let you generate dynamic string types on the fly, which you can use in various places including property names: https://www.typescriptlang.org/docs/handbook/2/template-lite...
and so on.
It does have a learning curve, and the tooling is annoying to set up.