Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/monads/docs/interfaces/optsome.md

👻 Option, Result, and Either types for TypeScript; Inspired by Rust
Go to Latest
File

@hqoss/monadsGlobalsOptSome

Interface: OptSome ‹T

Type parameters

T

Hierarchy

Index

Properties

Methods

Properties

type

type: symbol

Inherited from Option.type

Defined in lib/option/option.ts:12

Methods

and

andU›(optb: Option‹U›): Option‹U›

Overrides Option.and

Defined in lib/option/option.ts:28

Type parameters:

U

Parameters:

Name Type
optb Option‹U›

Returns: Option‹U›


andThen

andThenU›(fn: function): Option‹U›

Inherited from Option.andThen

Defined in lib/option/option.ts:17

Type parameters:

U

Parameters:

fn: function

▸ (val: T): Option‹U›

Parameters:

Name Type
val T

Returns: Option‹U›


isNone

isNone(): boolean

Inherited from Option.isNone

Defined in lib/option/option.ts:14

Returns: boolean


isSome

isSome(): boolean

Inherited from Option.isSome

Defined in lib/option/option.ts:13

Returns: boolean


map

mapU›(fn: function): OptSome‹U›

Overrides Option.map

Defined in lib/option/option.ts:26

Type parameters:

U

Parameters:

fn: function

▸ (val: T): U

Parameters:

Name Type
val T

Returns: OptSome‹U›


match

matchU›(fn: Match‹T, U›): U

Inherited from Option.match

Defined in lib/option/option.ts:15

Type parameters:

U

Parameters:

Name Type
fn Match‹T, U›

Returns: U


or

orU›(optb: Option‹U›): Option‹T›

Overrides Option.or

Defined in lib/option/option.ts:27

Type parameters:

U

Parameters:

Name Type
optb Option‹U›

Returns: Option‹T›


unwrap

unwrap(): T

Overrides Option.unwrap

Defined in lib/option/option.ts:25

Returns: T


unwrapOr

unwrapOr(def: T): T

Inherited from Option.unwrapOr

Defined in lib/option/option.ts:20

Parameters:

Name Type
def T

Returns: T