Skip to content

Latest commit

 

History

History
32 lines (17 loc) · 740 Bytes

File metadata and controls

32 lines (17 loc) · 740 Bytes

results-ts


results-ts / Result

Type Alias: Result<T, E>

Result<T, E> = OkResult<T, E> | ErrResult<T, E>

Defined in: result.ts:44

Result<T, E> is the type used for returning and propagating errors.

It is a type with the parameters, Ok(T), representing success and containing a value, and Err(E), representing error and containing an error value.

Functions return Result whenever errors are expected and recoverable.

Type Parameters

T

T

Contains the success value.

E

E

Contains the error value.