UNPKG

@ace-fetch/vue

Version:

vue adapter for @ace-fetch/core.

22 lines (21 loc) 680 B
import { InjectionKey } from 'vue-demi'; import type { Fetch } from '../types'; /** * activeFetch must be called to handle SSR at the top of functions like * `fetch`, `setup`, `serverPrefetch` and others */ export declare let activeFetch: Fetch | undefined; /** * inject key */ export declare const FetchInjectKey: InjectionKey<Fetch>; /** * Set or unset active fetch, Used in SSR and internally when calling * actions and getters * @param fetch Fetch instance */ export declare const setActiveFetch: (fetch: Fetch | undefined) => Fetch | undefined; /** * Get the currently active fetch if there is any. */ export declare const getActiveFetch: () => Fetch | undefined;