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

Fix delay and buffer switch cases

Changed files
+5 -6
src
+1
src/web/wonkaJs.re
···
| Close when !state.ended =>
state.ended = true;
state.talkback(. Close);
| Pull when !state.ended => state.talkback(. Pull)
| Pull => ()
},
···
| Close when !state.ended =>
state.ended = true;
state.talkback(. Close);
+
| Close => ()
| Pull when !state.ended => state.talkback(. Pull)
| Pull => ()
},
+4 -6
src/wonka_operators.re
···
state.ended = true;
state.sourceTalkback(. Close);
state.notifierTalkback(. Close);
-
| Pull =>
-
if (!state.pulled) {
-
state.pulled = true;
-
state.sourceTalkback(. Pull);
-
state.notifierTalkback(. Pull);
-
}
| Pull => ()
};
},
···
state.ended = true;
state.sourceTalkback(. Close);
state.notifierTalkback(. Close);
+
| Pull when !state.pulled =>
+
state.pulled = true;
+
state.sourceTalkback(. Pull);
+
state.notifierTalkback(. Pull);
| Pull => ()
};
},