import type { MatcherContext } from "../patterns/matcherContext.js"; import type { ScanOptions, FsAdapter } from "../types.js"; import type { EventMap, EventListener, EventListenerObject } from "./matcherStreamTypes.js"; export type { EntryInfo, EntryListener, EndListener, EventMap } from "./matcherStreamTypes.js"; export interface AddEventListenerOptions { capture?: boolean; once?: boolean; passive?: boolean; signal?: AbortSignal; } /** * Event emitter. * @augments EventTarget * * @since 0.6.0 */ export declare class MatcherStream extends EventTarget { #private; constructor(options: ScanOptions & { fs: FsAdapter; cwd: string; noTimeout?: boolean; }); addEventListener(type: K, callback: EventListenerObject | EventListener | null, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, callback: EventListenerObject | EventListener | null, options?: boolean | EventListenerOptions): void; dispatchEvent(event: EventMap[keyof EventMap]): boolean; /** * Resolves when everything is scanned. * * @since 0.8.0 */ start(): Promise; /** * Resolves when everything is scanned. (Callback version) * * @since 0.11.0 */ startCb(cb: (err: Error | null, ctx: MatcherContext) => void): void; }