Skip to main content
cngx-src documentation

OptimisticState

Interface

projects/common/interactive/optimistic/optimistic.ts

Import#

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

Description#

State exposed by the optimistic action.

Index#

Instance Properties#

error#Signal
Readonly

The error from the last failed action (undefined if successful).

rolledBack#Signal
Readonly

Whether a rollback occurred on the last invocation.

Readonly

Full CngxAsyncState view of the optimistic lifecycle.

Bind to any [state] consumer to connect the feedback system. Status is 'pending' while the confirming Observable is in flight, 'success' on confirmation, 'error' on rollback.