/** One comment in the file, in character offsets and in the lines it covers. */ export type CommentSpan = { /** Index of the slash that opens it. */ start: number; /** One past the comment's last character, its closing delimiter included. */ end: number; /** 1-based line the comment opens on. */ line: number; /** 1-based line the comment ends on — equal to `line` unless it is a block comment. */ endLine: number; /** The comment's own text, opening marker included. */ text: string; }; /** * Every comment in `source`, in order. * * `text` is sliced from the original so a caller can cut at `start` and keep the code * that was already there — which is the operation the pruner must get exactly right. */ export declare function commentSpans(source: string): CommentSpan[]; /** * Does this code stop INSIDE something open? * * The question the comment-only proof had to learn to ask. `original.startsWith(kept)` is * true of EVERY truncation, so it cannot tell a revealed comment from a string cut in * half; a prefix that ends inside a quote, a template or a regex is a different program, * whatever it starts with. This is what would have refused the write that left * `snippet: \`` in `src/`. */ export declare function endsInsideLiteral(code: string): boolean;