Skip to content

results-ts


results-ts / Option

Type Alias: Option<T>

Option<T> = SomeOption<T> | NoneOption<T>

Defined in: option.ts:37

Type Option represents an optional value: every Option is either Some and contains a value, or None, and does not.

Options are commonly paired with pattern matching to query the presence of a value and take action, always accounting for the None case.

Type Parameters

T

T

Contains the type of the value that may be present in the Option.