Skip to content

Comment on Pattern Matching Custom Data Types in TypeScriptparent

Comments

I see a lot of people asking for this in TS, but i'd much rather it be in plain JS and let TS add anything on top of it that is needed.

Pattern matching would work SO WELL in javascript, especially considering how frequently switch is currently poorly used as a replacement in things like Redux.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.