api/classes/await
Globals / Await
Class: Await<A, E>
A special data structure that can be set only once. Any get operation on Await will "wait" for a set to happen first. Its kind of like a Promise, because it can be set only once.
Type parameters
Name | Description |
---|---|
A | Success value |
E | Errors thrown |
Hierarchy
- Await
Index
Properties
Accessors
Methods
Properties
id
• Readonly
id: number = AWAIT_ID.create()
Defined in packages/core/lib/main/Await.ts:34
Accessors
get
• get get(): QIO<A, E>
Defined in packages/core/lib/main/Await.ts:38
Returns: QIO<A, E>
isSet
• get isSet(): QIO<boolean>
Defined in packages/core/lib/main/Await.ts:45
Returns: QIO<boolean>
Methods
set
▸ set(io
: QIO<A, E>): QIO<boolean>
Defined in packages/core/lib/main/Await.ts:63
Parameters:
Name | Type |
---|---|
io | QIO<A, E> |
Returns: QIO<boolean>
setTo
▸ setTo(a
: A): QIO<boolean>
Defined in packages/core/lib/main/Await.ts:89
Parameters:
Name | Type |
---|---|
a | A |
Returns: QIO<boolean>
of
▸ Static
of<A, E>(): QIO<Await<A, E>>
Defined in packages/core/lib/main/Await.ts:26
Type parameters:
Name | Default |
---|---|
A | never |
E | never |