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

StreamHaltStrategy

16 exports Since v2.0.0 Source

Constructors

Since v2.0.0

Signature

declare const Both: HaltStrategy
Since v2.0.0

Signature

declare const Either: HaltStrategy

Signature

declare const fromInput: (input: HaltStrategyInput) => HaltStrategy
Since v2.0.0

Signature

declare const Left: HaltStrategy
Since v2.0.0

Signature

declare const Right: HaltStrategy

Folding

Since v2.0.0

Folds over the specified HaltStrategy using the provided case functions.

Signature

declare const match: {
<Z>(options: {
readonly onBoth: () => Z;
readonly onEither: () => Z;
readonly onLeft: () => Z;
readonly onRight: () => Z;
}): (self: HaltStrategy) => Z;
<Z>(self: HaltStrategy, options: {
readonly onBoth: () => Z;
readonly onEither: () => Z;
readonly onLeft: () => Z;
readonly onRight: () => Z;
}): Z;
}

Models

Both

interface
Since v2.0.0

Signature

interface Both {
readonly _tag: "Both";
}

Either

interface
Since v2.0.0

Signature

interface Either {
readonly _tag: "Either";
}
Since v2.0.0

Signature

type HaltStrategy = Left | Right | Both | Either

Signature

type HaltStrategyInput = HaltStrategy | "left" | "right" | "both" | "either"

Left

interface
Since v2.0.0

Signature

interface Left {
readonly _tag: "Left";
}

Right

interface
Since v2.0.0

Signature

interface Right {
readonly _tag: "Right";
}

Refinements

Since v2.0.0

Signature

declare const isBoth: (self: HaltStrategy) => self is Both
Since v2.0.0

Signature

declare const isEither: (self: HaltStrategy) => self is Either
Since v2.0.0

Signature

declare const isLeft: (self: HaltStrategy) => self is Left
Since v2.0.0

Signature

declare const isRight: (self: HaltStrategy) => self is Right