@hqoss/monads › Globals › Option
Interface: Option ‹T›
Type parameters
▪ T
Hierarchy
Index
Properties
Methods
Properties
type
• type: symbol
Defined in lib/option/option.ts:12
Methods
and
▸ and‹U›(optb
: Option‹U›): Option‹U›
Defined in lib/option/option.ts:19
Type parameters:
▪ U
Parameters:
Name | Type |
---|---|
optb |
Option‹U› |
Returns: Option‹U›
andThen
▸ andThen‹U›(fn
: function): Option‹U›
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
Defined in lib/option/option.ts:14
Returns: boolean
isSome
▸ isSome(): boolean
Defined in lib/option/option.ts:13
Returns: boolean
map
▸ map‹U›(fn
: function): Option‹U›
Defined in lib/option/option.ts:16
Type parameters:
▪ U
Parameters:
▪ fn: function
▸ (val
: T): U
Parameters:
Name | Type |
---|---|
val |
T |
Returns: Option‹U›
match
▸ match‹U›(fn
: Match‹T, U›): U
Defined in lib/option/option.ts:15
Type parameters:
▪ U
Parameters:
Name | Type |
---|---|
fn |
Match‹T, U› |
Returns: U
or
▸ or‹U›(optb
: Option‹U›): Option‹T | U›
Defined in lib/option/option.ts:18
Type parameters:
▪ U
Parameters:
Name | Type |
---|---|
optb |
Option‹U› |
Returns: Option‹T | U›
unwrap
▸ unwrap(): T | never
Defined in lib/option/option.ts:21
Returns: T | never
unwrapOr
▸ unwrapOr(def
: T): T
Defined in lib/option/option.ts:20
Parameters:
Name | Type |
---|---|
def |
T |
Returns: T