@magnetarjs/core
Version:
Magnetar core library.
13 lines (12 loc) • 607 B
TypeScript
import type { DocMetadata, DoOnFetch, OnAddedFn, OnModifiedFn, OnRemovedFn } from '@magnetarjs/types';
/**
* Executes given function array with given args-array deconstructed, it will always use replace the first param with whatever the response of each function was.
*/
export declare function executeOnFns<Payload extends {
[key: string]: any;
} | string | undefined>(params: {
modifyReadResultFns: (OnAddedFn | OnModifiedFn | OnRemovedFn)[];
cacheStoreFns: (DoOnFetch | OnAddedFn | OnModifiedFn | OnRemovedFn)[];
payload: Payload;
docMetaData: DocMetadata;
}): Payload | undefined;