Skip to main content
cngx-src documentation

RetryState

Interface

projects/common/interactive/retry/with-retry.ts

Import#

import { RetryState } from '@cngx/common/interactive'

Description#

State exposed by the retryable action — read-only signals for UI feedback.

Index#

Instance Properties#

attempt#Signal
Readonly

Current attempt number (1-based). 0 before first invocation.

exhausted#Signal
Readonly

Whether all attempts have been exhausted.

lastError#Signal
Readonly

The last error from a failed attempt.

maxAttempts#Signal
Readonly

Total attempts allowed.

retrying#Signal
Readonly

Whether a retry is currently pending (waiting for delay).

Readonly

Full CngxAsyncState view of the retry lifecycle.

Bind to any [state] consumer to connect the feedback system. retrying (delay between retries) maps to 'pending' — the feedback system sees "still working" during retry delays.

Methods#

reset#void

Manually reset — clears exhausted state, resets attempt counter.