Skip to main content Link Search Menu Expand Document (external link)

StreamHaltStrategy.ts overview

Since v2.0.0


Exports Grouped by Category


constructors

Both

Signature

declare const Both: HaltStrategy

Source

Since v2.0.0

Either

Signature

declare const Either: HaltStrategy

Source

Since v2.0.0

Left

Signature

declare const Left: HaltStrategy

Source

Since v2.0.0

Signature

declare const Right: HaltStrategy

Source

Since v2.0.0

fromInput

Signature

declare const fromInput: (input: HaltStrategyInput) => HaltStrategy

Source

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
}

Source

Since v2.0.0

models

Both (interface)

Signature

export interface Both {
  readonly _tag: "Both"
}

Source

Since v2.0.0

Either (interface)

Signature

export interface Either {
  readonly _tag: "Either"
}

Source

Since v2.0.0

HaltStrategy (type alias)

Signature

type HaltStrategy = Left | Right | Both | Either

Source

Since v2.0.0

HaltStrategyInput (type alias)

Signature

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

Source

Since v2.0.0

Left (interface)

Signature

export interface Left {
  readonly _tag: "Left"
}

Source

Since v2.0.0

Right (interface)

Signature

export interface Right {
  readonly _tag: "Right"
}

Source

Since v2.0.0

refinements

isBoth

Signature

declare const isBoth: (self: HaltStrategy) => self is Both

Source

Since v2.0.0

isEither

Signature

declare const isEither: (self: HaltStrategy) => self is Either

Source

Since v2.0.0

isLeft

Signature

declare const isLeft: (self: HaltStrategy) => self is Left

Source

Since v2.0.0

isRight

Signature

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

Source

Since v2.0.0