when<T> abstract method

T when<T>({
  1. required T ok(
    1. D
    ),
  2. required T error(
    1. Exception
    ),
})

Checks the result type ok - Result handler error - Error handler

Implementation

T when<T>({ required T Function(D) ok, required T Function(Exception) error });