interface / @typed/vue/AsyncData

AsyncDataView

Vue projections of AsyncData. The latest available value survives refreshes and later failures.

Package version
1.0.0-beta.13
Category
interface

Import

import { AsyncDataView } from "@typed/vue/AsyncData";

Signatures

export interface AsyncDataView<A, E> {
    readonly data: Readonly<ShallowRef<Data.AsyncData<A, E>>>;
    readonly value: ComputedRef<Option.Option<A>>;
    readonly latest: ComputedRef<Option.Option<A>>;
    readonly cause: ComputedRef<Option.Option<Cause.Cause<E>>>;
    readonly error: ComputedRef<Option.Option<E>>;
    readonly loading: ComputedRef<boolean>;
    readonly refreshing: ComputedRef<boolean>;
    readonly pending: ComputedRef<boolean>;
    readonly success: ComputedRef<boolean>;
    readonly failure: ComputedRef<boolean>;
}

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source