Import
import { Refreshing } from "@typed/async-data";Signatures
export type Refreshing<A, E> = (Success<A> | Failure<E>) & {
readonly progress: Progress;
};Why
This refinement lets consumers distinguish refreshes without losing the previous result.
Ownership and lifetime
This structural view acquires no resources and has the lifetime of the underlying state value.
Property: progress
Progress whose presence marks the retained result as actively refreshing.
Examples
import type { Refreshing } from "@typed/async-data"
const state: Refreshing<number, never> = { _tag: "Success", value: 1, progress: { loaded: 0 } }