@hqoss/monads
Index
Interfaces
Variables
Functions
Object literals
Variables
Const
None
• None: OptNone‹any› = none_constructor()
Defined in lib/option/option.ts:44
Functions
Err
▸ Err‹T, E›(err
: E): ResErr‹T, E›
Defined in lib/result/result.ts:93
Type parameters:
▪ T
▪ E
Parameters:
Name | Type |
---|---|
err |
E |
Returns: ResErr‹T, E›
Left
▸ Left‹L, R›(val
: L): ResLeft‹L, R›
Defined in lib/either/either.ts:54
Type parameters:
▪ L
▪ R
Parameters:
Name | Type |
---|---|
val |
L |
Returns: ResLeft‹L, R›
Ok
▸ Ok‹T, E›(val
: T): ResOk‹T, E›
Defined in lib/result/result.ts:51
Type parameters:
▪ T
▪ E
Parameters:
Name | Type |
---|---|
val |
T |
Returns: ResOk‹T, E›
Right
▸ Right‹L, R›(val
: R): ResRight‹L, R›
Defined in lib/either/either.ts:111
Type parameters:
▪ L
▪ R
Parameters:
Name | Type |
---|---|
val |
R |
Returns: ResRight‹L, R›
Some
▸ Some‹T›(val?
: T | undefined): Option‹T›
Defined in lib/option/option.ts:38
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
val? |
T | undefined |
Returns: Option‹T›
isErr
▸ isErr‹T, E›(val
: Result‹T, E›): val is ResErr
Defined in lib/result/result.ts:139
Type parameters:
▪ T
▪ E
Parameters:
Name | Type |
---|---|
val |
Result‹T, E› |
Returns: val is ResErr
isLeft
▸ isLeft‹L, R›(val
: Either‹L, R›): val is ResLeft
Defined in lib/either/either.ts:168
Type parameters:
▪ L
▪ R
Parameters:
Name | Type |
---|---|
val |
Either‹L, R› |
Returns: val is ResLeft
isNone
▸ isNone‹T›(val
: Option‹T›): val is OptNone
Defined in lib/option/option.ts:132
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
val |
Option‹T› |
Returns: val is OptNone
isOk
▸ isOk‹T, E›(val
: Result‹T, E›): val is ResOk
Defined in lib/result/result.ts:135
Type parameters:
▪ T
▪ E
Parameters:
Name | Type |
---|---|
val |
Result‹T, E› |
Returns: val is ResOk
isRight
▸ isRight‹L, R›(val
: Either‹L, R›): val is ResRight
Defined in lib/either/either.ts:172
Type parameters:
▪ L
▪ R
Parameters:
Name | Type |
---|---|
val |
Either‹L, R› |
Returns: val is ResRight
isSome
▸ isSome‹T›(val
: Option‹T›): val is OptSome
Defined in lib/option/option.ts:128
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
val |
Option‹T› |
Returns: val is OptSome
none_constructor
▸ none_constructor‹T›(): OptNone‹T›
Defined in lib/option/option.ts:85
Type parameters:
▪ T
Returns: OptNone‹T›
some_constructor
▸ some_constructor‹T›(val
: T): OptSome‹T›
Defined in lib/option/option.ts:46
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
val |
T |
Returns: OptSome‹T›
Object literals
Const
EitherType
▪ EitherType: object
Defined in lib/either/either.ts:3
Left
• Left: symbol = Symbol(“:left”)
Defined in lib/either/either.ts:4
Right
• Right: symbol = Symbol(“:right”)
Defined in lib/either/either.ts:5
Const
OptionType
▪ OptionType: object
Defined in lib/option/option.ts:1
None
• None: symbol = Symbol(“:none”)
Defined in lib/option/option.ts:3
Some
• Some: symbol = Symbol(“:some”)
Defined in lib/option/option.ts:2
Const
ResultType
▪ ResultType: object
Defined in lib/result/result.ts:3
Err
• Err: symbol = Symbol(“:err”)
Defined in lib/result/result.ts:5
Ok
• Ok: symbol = Symbol(“:ok”)
Defined in lib/result/result.ts:4