ok property

Ok<T, E> get ok

Get the Ok value or throw an error if it's Err.

Implementation

Ok<T, E> get ok {
  try {
    return this as Ok<T, E>;
  } catch (e) {
    throw Exception('Attempted to get Ok from Err: $e');
  }
}