@magnetarjs/core
Version:
Magnetar core library.
14 lines (13 loc) • 773 B
TypeScript
import type { ActionName, ActionTernary, CollectionFn, DocFn, FetchMetaDataCollection, FetchPromises, GlobalConfig, ModuleConfig, WriteLock } from '@magnetarjs/types';
export type HandleFetchPerStoreParams = {
collectionPath: string;
_docId: string | undefined;
moduleConfig: ModuleConfig;
globalConfig: Required<GlobalConfig>;
fetchPromises: FetchPromises;
writeLockMap: Map<string, WriteLock>;
docFn: DocFn;
collectionFn?: CollectionFn;
setLastFetched?: (payload: FetchMetaDataCollection) => void;
};
export declare function handleFetchPerStore<TActionName extends Extract<ActionName, 'fetch' | 'fetchCount' | 'fetchSum' | 'fetchAverage'>>(sharedParams: HandleFetchPerStoreParams, actionName: TActionName): ActionTernary<TActionName>;