Types are erased in typescript, but you can write generics with `extends typeof Thing` and do runtime type checks: https://effectivetypescript.com/2020/07/27/safe-queryselector/
miniblog.
Related Posts
Playing with optional type signatures in Python, I realise that the return type is the most important to me.
I'd much rather have a function with only a return type instead of a function with only parameter types. It's often quick to add too.
Bootstrapping a language can be immensely satisfying.
I've added the ability to define stub types in the Garden stdlib and suddenly I don't need to special-case Int or String! They're just normal type declarations.
Noodling with an interpreter for a statically typed language with reified types (e.g. a list knows what type it contains).
Currently I have a single representation of types in both the runtime and the type checker. I think that's a good thing?