Cancels the currently running Future operation. Sends cancellation request to the backend service managing the Future. No-op if no Future is currently active.
Promise that resolves when cancellation is acknowledged
Error if cancellation request fails
Core future management container that handles Future lifecycle operations. Provides methods to add, remove, and query Future instances. Automatically injected by
decorator.
Current operation progress as a percentage (0-100). Returns 0 when no Future is active. Updates automatically as the Future operation progresses via WebSocket events.
Current operation status string representation. Common values: "IDLE", "IN_PROGRESS", "SUCCESS", "ERROR", "CANCELLED". Returns "IDLE" when no Future is active.
Whether an operation is currently actively executing. True when Future exists and has not reached an end state. False when no Future exists or operation has completed/failed/cancelled.
Whether the current or most recent operation was cancelled. Remains true after cancellation for status tracking until a new operation starts. False if operation completed normally or failed.
Optional futureCurrent active Future model instance containing operation details. Undefined when no operation is active. Automatically updated when operations start, progress, complete, or fail.
Interface for models using
Kos Future Aware
in full mode (default). Use TypeScript interface merging to add all Future Container properties to your model class.
Example
Add ESLint disable comment at top of file, then: