Skip to content
PACKAGES

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 { race } from "@graphrefly/ts/operators";
function race(): Operator<S, S>

A Operator<S, S> value.

import { race } from "@graphrefly/ts/operators";

packages/ts/src/graph/combinators.ts