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
I've heard of 'blub languages', where you don't realise that other languages have better abstractions until you've experienced them.
I think the same thing happens with individual features. I've seen several C++ folks miss variadic generics in Rust, but I've not written enough C++ to feel it.
Cases where it makes more sense to use concrete types rather than generics, even if you can be generic:
I've really come to appreciate OCaml's notion of generics. It doesn't have subtyping, so e.g. you have an `int list` or an arbitrary `'a list`, but nothing inbetween.
As soon as you add constraints like Java's `List<? as Foo>` it become incredibly hard to produce good errors.