KC's Workspace
    Preparing search index...

    Interface for custom coverage instrumenters.

    Matches the subset of istanbul-lib-instrument's Instrumenter that Vitest actually uses. Implement this to plug in a faster instrumenter while keeping the Istanbul coverage pipeline for collection, merging, and reporting.

    interface CoverageInstrumenter {
        instrumentSync: (
            code: string,
            filename: string,
            inputSourceMap?: any,
        ) => string;
        lastFileCoverage: () => any;
        lastSourceMap: () => any;
    }
    Index
    instrumentSync: (code: string, filename: string, inputSourceMap?: any) => string

    Instrument source code synchronously. Returns the instrumented code string.

    lastFileCoverage: () => any

    Get the Istanbul-compatible file coverage object of the last instrumented file.

    lastSourceMap: () => any

    Get the source map of the last instrumented file.