Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justinwoo/purescript-bismuth
A library for generating flow type signatures for direct interop between PureScript and Flow. Similar to OhYes
https://github.com/justinwoo/purescript-bismuth
codegen flowtype purescript
Last synced: 13 days ago
JSON representation
A library for generating flow type signatures for direct interop between PureScript and Flow. Similar to OhYes
- Host: GitHub
- URL: https://github.com/justinwoo/purescript-bismuth
- Owner: justinwoo
- License: mit
- Created: 2017-12-04T17:45:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-22T22:17:28.000Z (about 7 years ago)
- Last Synced: 2024-12-07T04:12:16.313Z (about 1 month ago)
- Topics: codegen, flowtype, purescript
- Language: PureScript
- Homepage:
- Size: 12.7 KB
- Stars: 19
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bismuth
[![Build Status](https://travis-ci.org/justinwoo/purescript-bismuth.svg?branch=master)](https://travis-ci.org/justinwoo/purescript-bismuth)
A library for generating flow type signatures for direct interop between PureScript and Flow. Similar to [OhYes](https://github.com/justinwoo/purescript-ohyes)
## Tl;dr
```hs
type A =
{ a :: Number
, b :: String
, c :: { d :: String }
, e :: Array String
, f :: Nullable String
, g :: Number -> Number -> Number
, h :: Fn2 Number Number Number
, i :: Fn2 Number (Fn2 Number Number Number) Number
, l :: Foreign
, k :: StrMap Number
}type VariantTest = Variant
( a :: String
, b :: Number
, c :: Boolean
)
``````js
//@flow
export type A = {
a: number,
b: string,
c: { d: string },
e: string[],
f: string | null,
g: (a: number) => (a: number) => number,
h: (a: number, b: number) => number,
i: (a: number, b: (a: number, b: number) => number) => number,
k: { [key: string]: number },
l: any
};
export type VariantTest =
| { type: "a", value: string }
| { type: "b", value: number }
| { type: "c", value: boolean };
```## Example
See and CONTRIBUTE to the [example here](https://github.com/justinwoo/bismuth-example)