How do you emulate ADTs and pattern matching in TypeScript?

前端 未结 6 1386
清酒与你
清酒与你 2020-12-20 13:53

Unfortunately, as of 0.9.5, TypeScript doesn\'t (yet) have algebraic data types (union types) and pattern matching (to destructure them). What\'s more, it doesn\'t even supp

6条回答
提交回复
热议问题