import { FSWatcher } from 'chokidar'; import { Node } from './node'; export type SimplePredicate = { (value: T): boolean; and?: (criteria: SimplePredicate) => SimplePredicate; }; export type ComplexPredicate = SimplePredicate | { (value: T): value is R; and?: (criteria: ComplexPredicate) => ComplexPredicate; }; export interface Traversable { filter(by: ComplexPredicate): R[]; find(by: ComplexPredicate): R | undefined; some(by: SimplePredicate): boolean; } /** * A tree of source files. Eventually, it's a graph. Ideally, it's an acyclic directed graph. * Technically, it's implemented as a map-like collection with references between map entries. */ export declare class BuildGraph implements Traversable { private store; watcher?: FSWatcher; put(value: Node | Node[]): this; private insert; get(url: string): Node; has(url: string): boolean; entries(): Node[]; values(): IterableIterator; some(by: ComplexPredicate): boolean; filter(by: ComplexPredicate): T[]; find(by: ComplexPredicate): T | undefined; get size(): number; }