GitHub

DaffOperationStateFacadeInterface

A facade for an operation state.

import { DaffOperationStateFacadeInterface } from '@daffodil/core/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

Name Type Description
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.