Comparing version 4.0.5 to 4.0.6
@@ -1,3 +0,3 @@ | ||
import * as types from '../Wonka_types.gen'; | ||
declare type talkbackCb = (tb: types.talkbackT) => void; | ||
import { talkbackT } from '../Wonka_types.gen'; | ||
declare type talkbackCb = (tb: talkbackT) => void; | ||
export declare const pull: import("../shims/Js.shim").talkbackT; | ||
@@ -4,0 +4,0 @@ export declare const close: import("../shims/Js.shim").talkbackT; |
{ | ||
"name": "wonka", | ||
"description": "A fast push & pull stream library for Reason/OCaml, Flow, and TypeScript", | ||
"version": "4.0.5", | ||
"version": "4.0.6", | ||
"author": "Phil Pluckthun <phil@kitten.sh>", | ||
@@ -27,3 +27,5 @@ "source": "./src/Wonka.ts", | ||
"docs:build": "gatsby build", | ||
"check": "tsc --noEmit", | ||
"check:ts": "tsc --noEmit", | ||
"check:flow": "flow focus-check ./src/helpers/Wonka_flow_test.js", | ||
"check": "run-s check:ts check:flow", | ||
"bs:clean": "bsb -clean-world", | ||
@@ -76,2 +78,3 @@ "bs:build": "bsb -make-world", | ||
"coveralls": "^3.0.9", | ||
"flow-bin": "^0.115.0", | ||
"flowgen": "^1.10.0", | ||
@@ -78,0 +81,0 @@ "gatsby": "^2.18.17", |
import { __ as block } from 'bs-platform/lib/es6/block'; | ||
import { talkbackPlaceholder } from './Wonka_helpers.bs'; | ||
import * as types from '../Wonka_types.gen'; | ||
type talkbackCb = (tb: types.talkbackT) => void; | ||
import { | ||
talkbackT, | ||
signalT | ||
} from '../Wonka_types.gen'; | ||
export const pull = (0 as any as types.talkbackT); | ||
export const close = (1 as any as types.talkbackT); | ||
type talkbackCb = (tb: talkbackT) => void; | ||
export const start = <a>(tb: talkbackCb): types.signalT<a> => block(0, [tb]) as any; | ||
export const push = <a>(x: a): types.signalT<a> => block(1, [x]) as any; | ||
export const end = <a>(): types.signalT<a> => 0 as any; | ||
export const pull = (0 as any as talkbackT); | ||
export const close = (1 as any as talkbackT); | ||
export const isStart = <a>(s: types.signalT<a>) => | ||
export const start = <a>(tb: talkbackCb): signalT<a> => block(0, [tb]) as any; | ||
export const push = <a>(x: a): signalT<a> => block(1, [x]) as any; | ||
export const end = <a>(): signalT<a> => 0 as any; | ||
export const isStart = <a>(s: signalT<a>) => | ||
typeof s !== 'number' && (s as any).tag === 0; | ||
export const isPush = <a>(s: types.signalT<a>) => | ||
export const isPush = <a>(s: signalT<a>) => | ||
typeof s !== 'number' && (s as any).tag === 1; | ||
export const isEnd = <a>(s: types.signalT<a>) => | ||
export const isEnd = <a>(s: signalT<a>) => | ||
typeof s === 'number' && (s as any) === 0; | ||
export const unboxPush = <a>(s: types.signalT<a>): a | null => | ||
export const unboxPush = <a>(s: signalT<a>): a | null => | ||
isPush(s) ? (s as any)[0] : null; | ||
export const unboxStart = <a>(s: types.signalT<a>): talkbackCb => | ||
export const unboxStart = <a>(s: signalT<a>): talkbackCb => | ||
isStart(s) ? (s as any)[0] : (talkbackPlaceholder as any); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
418117
139
8055
38