UNPKG

@magnetarjs/core

Version:
13 lines (12 loc) 779 B
import type { CollectionFn, CollectionInstance, DocFn, FetchMetaDataCollection, FetchPromises, GlobalConfig, ModuleConfig, WriteLock } from '@magnetarjs/types'; export declare function createCollectionWithContext(collectionPath: string, moduleConfig: ModuleConfig, globalConfig: Required<GlobalConfig>, docFn: DocFn, collectionFn: CollectionFn, streamAndFetchPromises: { writeLockMap: Map<string, WriteLock>; fetchPromises: FetchPromises; cacheStream: (closeStreamFn: () => void, streamingPromise: Promise<void> | null) => void; streaming: () => Promise<void> | null; closeStream: () => void; closeAllStreams: () => void; }, fetchMeta: { get: () => FetchMetaDataCollection; set: (payload: FetchMetaDataCollection) => void; }): CollectionInstance;