Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

ChildExecutorDecision

15 exports Since v2.0.0 Source

Constructors

Since v2.0.0

Signature

declare const Close: (value: unknown) => ChildExecutorDecision
Since v2.0.0

Signature

declare const Continue: (_: void) => ChildExecutorDecision
Since v2.0.0

Signature

declare const Yield: (_: void) => ChildExecutorDecision

Folding

Since v2.0.0

Folds over a ChildExecutorDecision to produce a value of type A.

Signature

declare const match: {
<A>(options: {
readonly onClose: (value: unknown) => A;
readonly onContinue: () => A;
readonly onYield: () => A;
}): (self: ChildExecutorDecision) => A;
<A>(self: ChildExecutorDecision, options: {
readonly onClose: (value: unknown) => A;
readonly onContinue: () => A;
readonly onYield: () => A;
}): A;
}

Models

Signature

type ChildExecutorDecision = Continue | Close | Yield

Close

interface
Since v2.0.0

Close the current substream with a given value and pass execution to the next substream

Signature

interface Close extends Proto {
readonly _tag: "Close";
readonly value: unknown;
}

Continue

interface
Since v2.0.0

Continue executing the current substream

Signature

interface Continue extends Proto {
readonly _tag: "Continue";
}

Yield

interface
Since v2.0.0

Pass execution to the next substream. This either pulls a new element from upstream, or yields to an already created active substream.

Signature

interface Yield extends Proto {
readonly _tag: "Yield";
}

Other

Refinements

Returns true if the specified value is a ChildExecutorDecision, false otherwise.

Signature

declare const isChildExecutorDecision: (u: unknown) => u is ChildExecutorDecision
Since v2.0.0

Returns true if the specified ChildExecutorDecision is a Close, false otherwise.

Signature

declare const isClose: (self: ChildExecutorDecision) => self is Close

Returns true if the specified ChildExecutorDecision is a Continue, false otherwise.

Signature

declare const isContinue: (self: ChildExecutorDecision) => self is Continue
Since v2.0.0

Returns true if the specified ChildExecutorDecision is a Yield, false otherwise.

Signature

declare const isYield: (self: ChildExecutorDecision) => self is Yield

Symbols

Signature

declare const ChildExecutorDecisionTypeId: unique symbol

Signature

type ChildExecutorDecisionTypeId = typeof ChildExecutorDecisionTypeId