Skip to main content
cngx-src documentation

AsyncStateSink

Interface

projects/common/data/async-state/operators.ts

Import#

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

Description#

Minimal write interface for async state operators.

Any ManualAsyncState<T> satisfies this - operators only need the write side.

Index#

Instance Properties#

isFirstLoad#function
Optional

Optional read side: when present, tapAsyncState picks refreshing over loading for a re-subscribe after data has already landed. Any ManualAsyncState<T> provides it.

Methods#

set(status: "idle" | "loading" | "refreshing" | "pending")
@paramstatus"idle" | "loading" | "refreshing" | "pending"
setError#void
setError(error: unknown)
@paramerrorunknown
setProgress#void
setProgress(value: number | undefined)
@paramvaluenumber | undefined
setSuccess#void
setSuccess(data: T)
@paramdataT