Skip to main content

Namespace: Option

Type Aliases

None

Ƭ None: None

Defined in

node_modules/@sapphire/result/dist/lib/Option.d.ts:29


Resolvable

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

Type parameters

Name
T

Defined in

node_modules/@sapphire/result/dist/lib/Option.d.ts:13


Some

Ƭ Some<T>: Some

Type parameters

Name
T

Defined in

node_modules/@sapphire/result/dist/lib/Option.d.ts:28


UnwrapSome

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

Type parameters

NameType
Textends Option<any>

Defined in

node_modules/@sapphire/result/dist/lib/Option.d.ts:30

Variables

none

Const none: None

Defined in

node_modules/@sapphire/result/dist/lib/Option.d.ts:26

Functions

from

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

Type parameters

NameDescription
T-

Parameters

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

Returns

Option<T>

Defined in

node_modules/@sapphire/result/dist/lib/Option.d.ts:20


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

node_modules/@sapphire/result/dist/lib/Option.d.ts:25


is

is<T>(value): true

Type parameters

Name
T

Parameters

NameType
valueOption<T>

Returns

true

Defined in

node_modules/@sapphire/result/dist/lib/Option.d.ts:14

is(value): value is Option<unknown>

Parameters

NameType
valueany

Returns

value is Option<unknown>

Defined in

node_modules/@sapphire/result/dist/lib/Option.d.ts:15


some

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

Type parameters

Name
T

Parameters

NameType
valueT

Returns

Some<T>

Defined in

node_modules/@sapphire/result/dist/lib/Option.d.ts:27