projects/common/data/async-state/create-async-state.ts
import { MutableAsyncState } from '@cngx/common/data'
Writable async state for mutations (POST/PUT/DELETE).
Extends the read-only CngxAsyncState with an execute() method that runs an async action and manages the full lifecycle.
CngxAsyncState
execute()
Promise
execute(fn: function)
Execute an async action.
Sets status to pending, then success or error on completion. Supersedes any in-flight execution — the previous result is discarded but the underlying network request is not aborted.
pending
success
error
function
void
reportProgress(value: number)
Report progress (0–100) during execution.
number
Reset to idle, clear data, error, and progress.
idle