All Projects → paarthenon → variant

paarthenon / variant

Licence: MPL-2.0 license
Variant types in TypeScript

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to variant

dotvariant
A type-safe and space-efficient sum type for C# (comparable to discriminated unions in C or C++)
Stars: ✭ 52 (-64.63%)
Mutual labels:  union, discriminated-unions, variant
recursive-variant
Recursive Variant: A simple library for Recursive Variant Types
Stars: ✭ 67 (-54.42%)
Mutual labels:  variants, variant
scala-3-crash-course
Scala 3 workshop presenting the top new features of the language.
Stars: ✭ 34 (-76.87%)
Mutual labels:  union, adt
Structures
Collection of abstract data structures implemented in Java
Stars: ✭ 99 (-32.65%)
Mutual labels:  adt
tt-in-cubical
Type Theory in Type Theory using Cubical Agda
Stars: ✭ 12 (-91.84%)
Mutual labels:  type-theory
ReduxSharp
Unidirectional Data Flow in C# - Inspired by Redux
Stars: ✭ 18 (-87.76%)
Mutual labels:  flux
NaiveNASflux.jl
Your local Flux surgeon
Stars: ✭ 20 (-86.39%)
Mutual labels:  flux
ordo
Ordo: A minimalist language with row polymorphism
Stars: ✭ 50 (-65.99%)
Mutual labels:  variants
mutable
State containers with dirty checking and more
Stars: ✭ 32 (-78.23%)
Mutual labels:  flux
pathoscore
pathoscore evaluates variant pathogenicity tools and scores.
Stars: ✭ 21 (-85.71%)
Mutual labels:  variants
cicada
Cicada Language
Stars: ✭ 9 (-93.88%)
Mutual labels:  type-theory
variantkey
Numerical Encoding for Human Genetic Variants
Stars: ✭ 32 (-78.23%)
Mutual labels:  variants
results
Discriminated Unions including Maybe (an option type) and Result for javascript with fewer bugs
Stars: ✭ 34 (-76.87%)
Mutual labels:  discriminated-unions
spark-vcf
Spark VCF data source implementation for Dataframes
Stars: ✭ 15 (-89.8%)
Mutual labels:  variants
k8s-gitops
Homelab GitOps repository. Cluster definition state via code.
Stars: ✭ 47 (-68.03%)
Mutual labels:  flux
neutronics-workshop
A workshop covering a range of fusion relevant analysis and simulations with OpenMC, DAGMC, Paramak and other open source fusion neutronics tools
Stars: ✭ 29 (-80.27%)
Mutual labels:  flux
unionfs
Use multiple fs modules at once
Stars: ✭ 170 (+15.65%)
Mutual labels:  union
react-workshops
Online react workshops
Stars: ✭ 36 (-75.51%)
Mutual labels:  flux
SpliceHack
An in-progress nethack variant based on version 3.7. An attempt to build a "kitchen sink" style variant that is easy to pick up and play.
Stars: ✭ 25 (-82.99%)
Mutual labels:  variant
path semantics
A research project in path semantics, a re-interpretation of functions for expressing mathematics
Stars: ✭ 136 (-7.48%)
Mutual labels:  type-theory

Variant Build Status npm NPM

A variant type is like an enum but each case can hold some extra data.

npm i -S variant

Variant aims to bring the experience of variant types to TypeScript. Variant types, a.k.a. discriminated unions in the TypeScript world, are an excellent tool for describing and handling flexible domain models and tiny DSLs. However, because "TypeScript instead builds on JavaScript patterns as they exist today" using them as-is can result in tedious and fragile code. This project addresses that by providing well-typed, fluent, and expressive tools to safely do away with the boilerplate.

Variant Logo Documentation

Variant 3.0 is in active development. Documentation featuring 3.0 features will be available shortly. In the meantime, the changes are available here.

everything below this line is project documentation for developers. Please use the website linked just above.


Initial setup

npm install

build

npm run build

test

npm test

Questions, comments, and contributions are welcome. Open an issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].