It will get pattern matching when JS does. Not certain yet but in progress.
match (x) {
"bob": ...,
string: ...,
() => Promise<void>: ...,
() => Promise<string>: ...,
}
with exhaustiveness checking for it to be truly useful.And as far as runtime goes, well, that's not what typescript does. It's a typical compile-time static type system.
Typescript aside, even a javascript-level first-class pattern expression is still extremely useful. I really hope it gets in there soon.