Skip to content

yarax/typescript-flow-haskell-types-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 

Repository files navigation

typescript-flow-haskell-types-comparison

Type Haskell TypeScript Flow JsDoc JSON Schema
Union data Shape = Circle | Triangle type Shape = CircleInterface | TriangleInterface var Shape: CircleVar | TriangleVar `({x: number, y: number, r: number} {{x: number, y: number, a: number, b: number, c: number}})`
Product Data Circle = Int Int Int interface Circle {x: number; y: number; radius: number } var Circle = {x: number, y: number, radius: number} {{x: number; y: number; radius: number}} type: "object", properties: {x: "number", y: "number", radius: "number"}
Nullable Maybe type type T1 = (x?: number) var Salary = ?number {?number} Depends on parser, either type: null if it supports undefined as well or using required
Non-nulalble - let s = e!.name ? {!{number}} -
Discriminated union Pattern matching in type constructor Understanding context Understanding context - -
Generics data Maybe a = Nothing | Just a interface GenericObject<T> {foo: T;} type GenericObject<T> = { foo: T }; - -

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published