Whether there is an active managed Promise.
Whether there is an active managed Promise and resolution is currently being processed.
Static
loggingWhether global logging is enabled.
Sets global logging enabled state.
Resolves any current Promise with undefined and creates a new current Promise.
Optional
opts: { Options.
Optional
reuse?: booleanWhen true if there is an existing live Promise it is returned immediately.
The new current managed Promise.
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.