function / @typed/vue

useAsyncDataSource

Observe a Typed AsyncData source directly, preserving its loading and optimistic states.

Package version
1.0.0-beta.13
Category
function

Import

import { useAsyncDataSource } from "@typed/vue";

Signatures

export declare function useAsyncDataSource<A, E, E2, R, ER = never>(source: MaybeRefOrGetter<ReactiveSource<Data.AsyncData<A, E>, E2, R | Scope.Scope>>, options?: Omit<ReactiveOptions<Data.AsyncData<A, E>, E2, R, ER>, "initial"> & {
    readonly initial?: Data.AsyncData<A, E>;
}): AsyncState<A, E | E2 | ER>;

Other public imports

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

Source