Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

Functions

Type aliases

Result

Result<A, B>: Either<Failure<A>, B>

Result of a precondition type.

A precondition either fails or provides a new value.

Type parameters

  • A

  • B

Functions

Const fail

  • fail constructs a new failed Result using the parameters supplied to create a new Failure instance.

    Type parameters

    • A

    • B

    Parameters

    • msg: string
    • value: A
    • Default value ctx: Context = {}

    Returns Result<A, B>

Const succeed

  • succeed<A, B>(b: B): Result<A, B>
  • succeed constructs a successful Result wraping the final version of the value in the right side of an Either.

    Type parameters

    • A

    • B

    Parameters

    • b: B

    Returns Result<A, B>

Legend

  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Class with type parameter

Generated using TypeDoc