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

MergeState overview

Added in v2.0.0


Table of contents


constructors

BothRunning

Signature

export declare const BothRunning: <Env, Err, Err1, Err2, Elem, Done, Done1, Done2>(
  left: Fiber.Fiber<Either.Either<Elem, Done>, Err>,
  right: Fiber.Fiber<Either.Either<Elem, Done1>, Err1>
) => MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>

Added in v2.0.0

LeftDone

Signature

export declare const LeftDone: <Env, Err, Err1, Err2, Elem, Done, Done1, Done2>(
  f: (exit: Exit.Exit<Done1, Err1>) => Effect.Effect<Done2, Err2, Env>
) => MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>

Added in v2.0.0

RightDone

Signature

export declare const RightDone: <Env, Err, Err1, Err2, Elem, Done, Done1, Done2>(
  f: (exit: Exit.Exit<Done, Err>) => Effect.Effect<Done2, Err2, Env>
) => MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>

Added in v2.0.0

folding

match

Signature

export declare const match: {
  <Env, Err, Err1, Err2, Elem, Done, Done1, Done2, Z>(options: {
    readonly onBothRunning: (
      left: Fiber.Fiber<Either.Either<Elem, Done>, Err>,
      right: Fiber.Fiber<Either.Either<Elem, Done1>, Err1>
    ) => Z
    readonly onLeftDone: (f: (exit: Exit.Exit<Done1, Err1>) => Effect.Effect<Done2, Err2, Env>) => Z
    readonly onRightDone: (f: (exit: Exit.Exit<Done, Err>) => Effect.Effect<Done2, Err2, Env>) => Z
  }): (self: MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>) => Z
  <Env, Err, Err1, Err2, Elem, Done, Done1, Done2, Z>(
    self: MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>,
    options: {
      readonly onBothRunning: (
        left: Fiber.Fiber<Either.Either<Elem, Done>, Err>,
        right: Fiber.Fiber<Either.Either<Elem, Done1>, Err1>
      ) => Z
      readonly onLeftDone: (f: (exit: Exit.Exit<Done1, Err1>) => Effect.Effect<Done2, Err2, Env>) => Z
      readonly onRightDone: (f: (exit: Exit.Exit<Done, Err>) => Effect.Effect<Done2, Err2, Env>) => Z
    }
  ): Z
}

Added in v2.0.0

models

BothRunning (interface)

Signature

export interface BothRunning<_Env, out Err, out Err1, _Err2, out Elem, out Done, out Done1, _Done2>
  extends MergeState.Proto {
  readonly _tag: "BothRunning"
  readonly left: Fiber.Fiber<Either.Either<Elem, Done>, Err>
  readonly right: Fiber.Fiber<Either.Either<Elem, Done1>, Err1>
}

Added in v2.0.0

LeftDone (interface)

Signature

export interface LeftDone<out Env, _Err, in Err1, out Err2, _Elem, _Done, in Done1, out Done2>
  extends MergeState.Proto {
  readonly _tag: "LeftDone"
  f(exit: Exit.Exit<Done1, Err1>): Effect.Effect<Done2, Err2, Env>
}

Added in v2.0.0

MergeState (type alias)

Signature

export type MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2> =
  | BothRunning<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>
  | LeftDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>
  | RightDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>

Added in v2.0.0

RightDone (interface)

Signature

export interface RightDone<out Env, in Err, _Err1, out Err2, _Elem, in Done, _Done1, out Done2>
  extends MergeState.Proto {
  readonly _tag: "RightDone"
  f(exit: Exit.Exit<Done, Err>): Effect.Effect<Done2, Err2, Env>
}

Added in v2.0.0

refinements

isBothRunning

Returns true if the specified MergeState is a BothRunning, false otherwise.

Signature

export declare const isBothRunning: <Env, Err, Err1, Err2, Elem, Done, Done1, Done2>(
  self: MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>
) => self is BothRunning<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>

Added in v2.0.0

isLeftDone

Returns true if the specified MergeState is a LeftDone, false otherwise.

Signature

export declare const isLeftDone: <Env, Err, Err1, Err2, Elem, Done, Done1, Done2>(
  self: MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>
) => self is LeftDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>

Added in v2.0.0

isMergeState

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

Signature

export declare const isMergeState: (
  u: unknown
) => u is MergeState<unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown>

Added in v2.0.0

isRightDone

Returns true if the specified MergeState is a RightDone, false otherwise.

Signature

export declare const isRightDone: <Env, Err, Err1, Err2, Elem, Done, Done1, Done2>(
  self: MergeState<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>
) => self is RightDone<Env, Err, Err1, Err2, Elem, Done, Done1, Done2>

Added in v2.0.0

symbols

MergeStateTypeId

Signature

export declare const MergeStateTypeId: typeof MergeStateTypeId

Added in v2.0.0

MergeStateTypeId (type alias)

Signature

export type MergeStateTypeId = typeof MergeStateTypeId

Added in v2.0.0

utils

MergeState (namespace)

Added in v2.0.0

Proto (interface)

Signature

export interface Proto {
  readonly [MergeStateTypeId]: MergeStateTypeId
}

Added in v2.0.0