UNPKG

histoire

Version:

A fast story book powered by Vite

23 lines • 1.16 kB
import type { ViteDevServer } from 'vite'; import type { StartupProgress } from '../runtime/terminal/progress.js'; import type { createStoryCollector } from './collect.js'; /** Inputs of {@link runInitialCollection}. */ export interface InitialCollectionOptions { /** Collector owned by the generation. */ collector: Pick<ReturnType<typeof createStoryCollector>, 'collect' | 'restore' | 'revalidate'>; /** Client-facing Vite server. */ server: ViteDevServer; /** Observer of real startup work. */ progress: StartupProgress; /** Skips catalog restoration (fresh generation). */ fresh?: boolean; /** Throws when the generation was cancelled or superseded. */ checkActive: () => void; } /** * Brings the catalog to a usable state: the previous run's catalog when still * valid (revalidated in the background), otherwise a full collection followed by * the client warmup. Resolves when the generation may be published as ready. */ export declare function runInitialCollection({ collector, server, progress, fresh, checkActive }: InitialCollectionOptions): Promise<void>; //# sourceMappingURL=initial-collection.d.ts.map