GitHub

DaffOperationStateFacadeInterface

import { DaffOperationStateFacadeInterface } from '@daffodil/core/state'

A facade for an operation state.

interface DaffOperationStateFacadeInterface<TState extends DaffOperationState = DaffOperationState> {
  loadingState$: Observable<TState['daffState']>
  loading$: Observable<boolean>
  resolving$: Observable<boolean>
  mutating$: Observable<boolean>
  errors$: Observable<TState['daffErrors']>
  hasErrors$: Observable<boolean>
}

Properties

loadingState$
Observable<TState['daffState']>

The loading state enum.

loading$
Observable<boolean>

Whether the operation state is in any of the loading states.

resolving$
Observable<boolean>

Whether the operation state is resolving.

mutating$
Observable<boolean>

Whether the operation state is mutating.

errors$
Observable<TState['daffErrors']>

The errors in the operation state.

hasErrors$
Observable<boolean>

Whether the operation state has any errors. If so, it should be considered to be in an "error" state.