StreamHaltStrategy.ts overview
Since v2.0.0
Exports Grouped by Category
constructors
Both
Signature
declare const Both: HaltStrategy
Since v2.0.0
Either
Signature
declare const Either: HaltStrategy
Since v2.0.0
Left
Signature
declare const Left: HaltStrategy
Since v2.0.0
Right
Signature
declare const Right: HaltStrategy
Since v2.0.0
fromInput
Signature
declare const fromInput: (input: HaltStrategyInput) => HaltStrategy
Since v2.0.0
folding
match
Folds over the specified HaltStrategy
using the provided case functions.
Signature
declare const match: {
<Z>(options: {
readonly onLeft: () => Z
readonly onRight: () => Z
readonly onBoth: () => Z
readonly onEither: () => Z
}): (self: HaltStrategy) => Z
<Z>(
self: HaltStrategy,
options: {
readonly onLeft: () => Z
readonly onRight: () => Z
readonly onBoth: () => Z
readonly onEither: () => Z
}
): Z
}
Since v2.0.0
models
Both (interface)
Signature
export interface Both {
readonly _tag: "Both"
}
Since v2.0.0
Either (interface)
Signature
export interface Either {
readonly _tag: "Either"
}
Since v2.0.0
HaltStrategy (type alias)
Signature
type HaltStrategy = Left | Right | Both | Either
Since v2.0.0
HaltStrategyInput (type alias)
Signature
type HaltStrategyInput = HaltStrategy | "left" | "right" | "both" | "either"
Since v2.0.0
Left (interface)
Signature
export interface Left {
readonly _tag: "Left"
}
Since v2.0.0
Right (interface)
Signature
export interface Right {
readonly _tag: "Right"
}
Since v2.0.0
refinements
isBoth
Signature
declare const isBoth: (self: HaltStrategy) => self is Both
Since v2.0.0
isEither
Signature
declare const isEither: (self: HaltStrategy) => self is Either
Since v2.0.0
isLeft
Signature
declare const isLeft: (self: HaltStrategy) => self is Left
Since v2.0.0
isRight
Signature
declare const isRight: (self: HaltStrategy) => self is Right
Since v2.0.0