Module: Maybe
Type Aliases
Just
Ƭ Just<Value>: Object
Type constructor for Just.
Describes the special object with one property, represented as unique symbol
key, holding the provided value type.
Type parameters
| Name |
|---|
Value |
Type declaration
| Name | Type |
|---|---|
[jid] | Value |
Maybe
Ƭ Maybe<Value>: Just<Value> | Nothing
Type constructor for Maybe.
Can be either Just of a provided value type, or Nothing.
Type parameters
| Name |
|---|
Value |
Nothing
Ƭ Nothing: Object
Type constructor for Nothing.
Describes the special object with one property, represented as unique symbol
key, holding the null value type.
Type declaration
| Name | Type |
|---|---|
[nid] | undefined |
Variables
jid
• Const jid: typeof jid
Internal unique identifier for Just.
nid
• Const nid: typeof nid
Internal unique identifier for Nothing.
Functions
just
▸ just<Value>(value): Just<Value>
Constructor function for Just.
Creates the special object with one property, represented as unique symbol
key, holding the provided value.
Type parameters
| Name |
|---|
Value |
Parameters
| Name | Type |
|---|---|
value | Value |
Returns
Just<Value>
maybe
▸ maybe<Value>(value): Maybe<Value>
Constructor function for Maybe.
Creates either just of a provided value, or nothing.
Type parameters
| Name |
|---|
Value |
Parameters
| Name | Type |
|---|---|
value | undefined | null | Value |
Returns
Maybe<Value>
nothing
▸ nothing(): Nothing
Constructor function for Nothing.
Creates the special object with one property, represented as unique symbol
key, holding the null value.