import type { Replacement, SeamMutant } from './types'; /** A source file to instrument: its name (path) and current content. */ export interface SourceFile { /** File name / path. Must match the `fileName` of any {@link Replacement} targeting it. */ name: string; /** Current (unmutated) source text. */ content: string; } /** * The result of instrumenting a file set: the emitted switch-embedded source * per file, plus the manifest of collected mutants. The two are guaranteed * consistent — every {@link SeamMutant} in `mutants` has its activation switch * present in the corresponding emitted file (§3.1). */ export interface InstrumentResult { /** Emitted, switch-embedded source per input file (same order as input). */ files: SourceFile[]; /** * The collected mutants, each carrying its deterministic id, the Stryker * `mutatorName`, the printed `replacement` text, and the 0-based source * `location`. This is the manifest half of the two coupled artifacts. */ mutants: SeamMutant[]; } /** * Instrument `files`, expressing `replacements` as Stryker mutants via the * out-of-band seam. * * Each {@link Replacement} is assigned its deterministic id (a pure function of * `{ fileName, range, replacement }`), then handed to Stryker's machinery so the * id ends up baked into BOTH the source switch and the manifest record. The * returned {@link SeamMutant}s carry that id, the printed replacement, and the * 0-based location. A replacement whose span matches no babel node is silently * not collected (it produces neither a switch nor a record) — callers that need * to detect un-placed replacements can diff the returned ids against the ids * they computed from their input. * * @param files The source files to instrument. * @param replacements The vetted edits to express as mutants. * @returns The emitted source per file plus the mutant manifest, in lockstep. * @throws If the Node worker cannot run or fails to instrument. */ export declare function instrument(files: readonly SourceFile[], replacements: readonly Replacement[]): Promise;