Skip to main content
cngx-src documentation

ManualAsyncState

Interface

projects/common/data/async-state/create-manual-state.ts

Import#

import { ManualAsyncState } from '@cngx/common/data'

Description#

Writable extension of CngxAsyncState for manual control.

Returned by createManualState() — provides imperative setters while the read-side stays the standard CngxAsyncState interface.

Metadata#

Index#

Methods#

reset#void

Reset to idle, clear data, error, and progress.

set(status: AsyncStatus)

Set the status directly.

@paramstatusAsyncStatus
setError#void
setError(error: unknown)

Transition to error.

@paramerrorunknown
setProgress#void
setProgress(value: number | undefined)

Set progress (0–100).

@paramvaluenumber | undefined
setSuccess#void
setSuccess(data: T)

Transition to success with data.

@paramdataT