ts-sum-types
Overview
Algebraic sum types (aka tagged unions) for TypeScript.
Designed after Rust's enums.
Installation
npm install --save ts-sum-types
This library exports a ES6 module with types.
; // Create an `enum` to classify a web event.;; // A function which takes a `WebEvent` enum as an argument
Development
npm installnpm run buildnpm publish