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

x/monads/docs/interfaces/resleft.md

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

@hqoss/monadsGlobalsResLeft

Interface: ResLeft ‹L, R

Type parameters

L

R

Hierarchy

  • Either‹L, R›

    ResLeft

Index

Properties

Methods

Properties

type

type: symbol

Inherited from Either.type

Defined in lib/either/either.ts:14

Methods

isLeft

isLeft(): boolean

Inherited from Either.isLeft

Defined in lib/either/either.ts:15

Returns: boolean


isRight

isRight(): boolean

Inherited from Either.isRight

Defined in lib/either/either.ts:16

Returns: boolean


left

left(): Option‹L›

Inherited from Either.left

Defined in lib/either/either.ts:17

Returns: Option‹L›


leftAndThen

leftAndThenU›(fn: function): Either‹U, R›

Inherited from Either.leftAndThen

Defined in lib/either/either.ts:18

Type parameters:

U

Parameters:

fn: function

▸ (val: L): Either‹U, R›

Parameters:

Name Type
val L

Returns: Either‹U, R›


map

mapU›(fn: function): ResLeft‹U, never›

Overrides Either.map

Defined in lib/either/either.ts:39

Type parameters:

U

Parameters:

fn: function

▸ (val: L | R): U

Parameters:

Name Type
val L | R

Returns: ResLeft‹U, never›


mapLeft

mapLeftU›(fn: function): Either‹U, never›

Overrides Either.mapLeft

Defined in lib/either/either.ts:40

Type parameters:

U

Parameters:

fn: function

▸ (left: L): U

Parameters:

Name Type
left L

Returns: Either‹U, never›


mapRight

mapRightU›(fn: function): ResLeft‹L, never›

Overrides Either.mapRight

Defined in lib/either/either.ts:41

Type parameters:

U

Parameters:

fn: function

▸ (right: R): U

Parameters:

Name Type
right R

Returns: ResLeft‹L, never›


match

matchU›(fn: Match‹L, never, U›): U

Overrides Either.match

Defined in lib/either/either.ts:38

Type parameters:

U

Parameters:

Name Type
fn Match‹L, never, U›

Returns: U


right(): Option‹R›

Inherited from Either.right

Defined in lib/either/either.ts:19

Returns: Option‹R›


rightAndThen

rightAndThenU›(fn: function): Either‹L, U›

Inherited from Either.rightAndThen

Defined in lib/either/either.ts:20

Type parameters:

U

Parameters:

fn: function

▸ (val: R): Either‹L, U›

Parameters:

Name Type
val R

Returns: Either‹L, U›


unwrap

unwrap(): L

Overrides Either.unwrap

Defined in lib/either/either.ts:35

Returns: L


unwrapLeft

unwrapLeft(): L

Overrides Either.unwrapLeft

Defined in lib/either/either.ts:36

Returns: L


unwrapLeftOr

unwrapLeftOr(other: L): L

Inherited from Either.unwrapLeftOr

Defined in lib/either/either.ts:23

Parameters:

Name Type
other L

Returns: L


unwrapLeftOrElse

unwrapLeftOrElse(fn: function): L

Inherited from Either.unwrapLeftOrElse

Defined in lib/either/either.ts:24

Parameters:

fn: function

▸ (right: R): L

Parameters:

Name Type
right R

Returns: L


unwrapRight

unwrapRight(): never

Overrides Either.unwrapRight

Defined in lib/either/either.ts:37

Returns: never


unwrapRightOr

unwrapRightOr(other: R): R

Inherited from Either.unwrapRightOr

Defined in lib/either/either.ts:26

Parameters:

Name Type
other R

Returns: R


unwrapRightOrElse

unwrapRightOrElse(fn: function): R

Inherited from Either.unwrapRightOrElse

Defined in lib/either/either.ts:27

Parameters:

fn: function

▸ (left: L): R

Parameters:

Name Type
left L

Returns: R