Class ManagedPromise
Index
Constructors
constructor
- new ManagedPromise(): ManagedPromise
Returns ManagedPromise
Accessors
isActive
- get isActive(): boolean
Returns boolean
Whether there is an active managed Promise.
isProcessing
- get isProcessing(): boolean
Returns boolean
Whether there is an active managed Promise and resolution is currently being processed.
Static
logging
- get logging(): boolean
Returns boolean
Whether global logging is enabled.
- set logging(logging: boolean): void
Sets global logging enabled state.
Parameters
- logging: boolean
New logging enabled state.
Returns void
- logging: boolean
Provides management of a single Promise that can be shared and accessed across JS & Svelte components. This allows a Promise to be created and managed as part of the TRL application lifecycle and accessed safely in various control flow scenarios. When resolution of the current managed Promise starts further interaction is prevented.
Note: to enable debugging / log statements set the static
logging
variable to true.