histoire
Version:
A fast story book powered by Vite
28 lines • 1.48 kB
TypeScript
import type { EvidenceIndex } from './evidence-index.js';
import type { AffectedChange } from './types.js';
/** What the selector knows beyond the index about stories it may not exclude. */
export interface UnprovenState {
/** Stories whose retained graph is outdated by an event not yet re-analyzed. */
stale: ReadonlySet<string>;
/** Every retained graph is outdated (structural event not yet re-analyzed). */
all: boolean;
}
/** Classification before the selector stamps order onto it. */
export type Classification = Omit<AffectedChange, 'seq'>;
/**
* Decides which stories one file event affects, from the retained index only.
*
* Rules, in order: graph members select their owners (plus anything that
* cannot be excluded); paths the existing watcher rules ignore select nothing;
* edits of source modules outside every graph select only unproven stories;
* everything else (add/unlink, config and data files) may change resolution
* anywhere and selects the whole scope. An index that never completed, or an
* outdated one, proves nothing.
* @param index Last complete evidence.
* @param unproven Outdated graphs.
* @param root Project root for the shared ignored-path rule.
* @param event Chokidar event name.
* @param file Absolute changed path.
*/
export declare function classifyFileEvent(index: EvidenceIndex, unproven: UnprovenState, root: string, event: string, file: string): Classification;
//# sourceMappingURL=classify.d.ts.map