Skip to main content

@sapphire/result

Namespaces

NamespaceDescription
Option-
Result-

Classes

ClassDescription
ErrA type used to express computations that can fail, it can be used for returning and propagating errors. This is a type union with the variants Ok(T), representing success and containing a value, and Err(E), representing error and containing an error value.
None-
OkA type used to express computations that can fail, it can be used for returning and propagating errors. This is a type union with the variants Ok(T), representing success and containing a value, and Err(E), representing error and containing an error value.
OptionError-
ResultError-
Some-

Interfaces

InterfaceDescription
IOption-
IResultA type used to express computations that can fail, it can be used for returning and propagating errors. This is a type union with the variants Ok(T), representing success and containing a value, and Err(E), representing error and containing an error value.

Type Aliases

Type aliasDescription
OptionThe union of the two variations of Option.
ResultThe union of the two variations of Result.

Variables

VariableDescription
none-

Functions

FunctionDescription
errCreates an Err with no error.
okCreates an Ok with no value.
some-