API Reference
race()
race: the FIRST dep to deliver DATA wins; thereafter only the winner's messages flow (losers are dropped, including their terminals). partial:true + ctx.state winner. errorWhenDepsError:false (a LOSER's error must not error the race — only the winner's) + completeWhenDepsComplete:false + terminalAsRealInput:true. If every dep terminates before any DATA, COMPLETE.
Import
import { race } from "@graphrefly/ts/operators";
Signature
function race(): Operator<S, S>
Returns
A Operator<S, S> value.
Example
import { race } from "@graphrefly/ts/operators";
Source
packages/ts/src/graph/combinators.ts