Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
chpatrick
· 3y ago · 0 comments
Type-refining if in TypeScript is good enough for pattern matching if you ask me.
Comments
[–]
graftak
3y ago
The TypeScript type system meta programming actually does pattern matching very well, it’s just the underlying JS runtimes that can’t, there is a proposal for it though;
https://github.com/tc39/proposal-pattern-matching
.