Skip to main content

Namespace: Option

result/src.Option

Type Aliases

None

Ƭ None: None

Defined in

projects/utilities/packages/result/src/lib/Option.ts:59


Resolvable

Ƭ Resolvable<T>: T | null | undefined | Option<T>

Type parameters

Name
T

Defined in

projects/utilities/packages/result/src/lib/Option.ts:16


Some

Ƭ Some<T>: Some

Type parameters

Name
T

Defined in

projects/utilities/packages/result/src/lib/Option.ts:58


UnwrapSome

Ƭ UnwrapSome<T>: T extends Some<infer S> ? S : never

Type parameters

NameType
Textends Option<any>

Defined in

projects/utilities/packages/result/src/lib/Option.ts:61

Variables

none

Const none: None = _none

Defined in

projects/utilities/packages/result/src/lib/Option.ts:55

Functions

from

from<T>(op): Option<T>

Type parameters

NameDescription
T-

Parameters

NameType
opResolvable<T> | () => Resolvable<T>

Returns

Option<T>

Defined in

projects/utilities/packages/result/src/lib/Option.ts:33


fromAsync

fromAsync<T>(op): Promise<Option<T>>

Type parameters

NameDescription
T-

Parameters

NameType
opAwaitable<Resolvable<T>> | () => Awaitable<Resolvable<T>>

Returns

Promise<Option<T>>

Defined in

projects/utilities/packages/result/src/lib/Option.ts:47


is

is<T>(value): true

Type parameters

Name
T

Parameters

NameType
valueOption<T>

Returns

true

Defined in

projects/utilities/packages/result/src/lib/Option.ts:23

is(value): value is Option<unknown>

Parameters

NameType
valueany

Returns

value is Option<unknown>

Defined in

projects/utilities/packages/result/src/lib/Option.ts:24


some

some<T>(value): Some<T>

Type parameters

Name
T

Parameters

NameType
valueT

Returns

Some<T>

Defined in

projects/utilities/packages/result/src/lib/Option.ts:56