Mirror: 🎩 A tiny but capable push & pull stream library for TypeScript and Flow
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix up several types and output

+12 -10
+1
.terser.config.json
··· 2 2 "keep_fnames": true, 3 3 "ie8": false, 4 4 "compress": { 5 + "pure_getters": true, 5 6 "toplevel": true, 6 7 "booleans_as_integers": false, 7 8 "keep_fnames": true,
+4 -4
__tests__/wonka_test.re
··· 284 284 let talkback = ref((._: Wonka_types.talkbackT) => ()); 285 285 let num = ref(1); 286 286 287 - let source = Wonka.scan((acc, x) => acc + x, 0, sink => sink(.Start((.signal) => { 287 + let source = Wonka.scan((.acc, x) => acc + x, 0, sink => sink(.Start((.signal) => { 288 288 switch (signal) { 289 289 | Pull => { 290 290 let i = num^; ··· 316 316 }); 317 317 318 318 testPromise("follows the spec for listenables", () => { 319 - Wonka_thelpers.testWithListenable(Wonka.scan((_, x) => x, 0)) 319 + Wonka_thelpers.testWithListenable(Wonka.scan((._, x) => x, 0)) 320 320 |> Js.Promise.then_(x => { 321 321 expect(x) 322 322 |> toEqual(([||], [| Push(1), Push(2), End |])) ··· 327 327 testPromise("ends itself and source when its talkback receives the End signal", () => { 328 328 let end_: talkbackT = Close; 329 329 330 - Wonka_thelpers.testTalkbackEnd(Wonka.scan((_, x) => x, 0)) 330 + Wonka_thelpers.testTalkbackEnd(Wonka.scan((._, x) => x, 0)) 331 331 |> Js.Promise.then_(x => { 332 332 expect(x) 333 333 |> toEqual(([| end_ |], [| Push(1) |])) ··· 1409 1409 [|Push(40), Push(50)|], 1410 1410 ); 1411 1411 }); 1412 - }); 1412 + });
-1
src/index.js
··· 1 1 export * from './pipe'; 2 2 export * from './wonka'; 3 - export * from './web/wonkaJs';
+1 -1
src/operators/wonka_operator_combine.d.ts
··· 1 1 import { Source } from '../wonka_types'; 2 2 3 - export const combine: <A, B>(a: Source<A>, b: Source<B>) => Source<[A, B]>; 3 + export const combine: <A, B>(a: Source<A>) => (b: Source<B>) => Source<[A, B]>;
+2 -2
src/operators/wonka_operator_combine.re
··· 11 11 mutable ended: bool, 12 12 }; 13 13 14 - let combine = (sourceA, sourceB) => curry(sink => { 14 + let combine = sourceA => curry(sourceB => curry(sink => { 15 15 let state = { 16 16 talkbackA: talkbackPlaceholder, 17 17 talkbackB: talkbackPlaceholder, ··· 83 83 } 84 84 }; 85 85 })); 86 - }); 86 + }));
+1 -1
src/operators/wonka_operator_scan.re
··· 6 6 source((.signal) => sink(. 7 7 switch (signal) { 8 8 | Push(x) => { 9 - acc := f(acc^, x); 9 + acc := f(.acc^, x); 10 10 Push(acc^) 11 11 } 12 12 | Start(x) => Start(x)
+1 -1
src/operators/wonka_operator_scan.rei
··· 1 1 open Wonka_types; 2 2 3 - let scan: (('b, 'a) => 'b, 'b, sourceT('a), sinkT('b)) => unit; 3 + let scan: ((.'b, 'a) => 'b, 'b, sourceT('a), sinkT('b)) => unit;
+2
src/wonka.d.ts
··· 27 27 /* sinks */ 28 28 export * from './sinks/wonka_sink_publish'; 29 29 export * from './sinks/wonka_sink_subscribe'; 30 + 31 + export * from './web/wonkaJs';