Type alias Matcher<T, E, A>

Matcher<T, E, A>: {
    Err: ((error) => A);
    Ok: ((value) => A);
}

A lightweight object defining how to handle each variant of a Result.

Type Parameters

  • T

  • E

  • A

Type declaration

  • Err: ((error) => A)
      • (error): A
      • Parameters

        • error: E

        Returns A

  • Ok: ((value) => A)
      • (value): A
      • Parameters

        • value: T

        Returns A

Generated using TypeDoc