import type { PiiMatch, RedactionConfig } from "./types.js"; /** * Redact PII matches from text. * * Modes: * - "mask": Replace middle characters with mask char (e.g., "jo**@example.com") * - "remove": Remove the PII entirely * - "placeholder": Replace with type label (e.g., "[EMAIL]") * * Overlapping matches are merged into maximal intervals before substitution. * Detection routinely produces overlaps — e.g. `us_bank_number` (`\d{8,17}`) * spans the same digit run as `npi` / `us_drivers_license`. Substituting them * independently (the old descending-start loop) let an inner match's * replacement shift the text so an outer match's now-stale `end` sliced the * wrong point, leaving trailing PII digits behind in placeholder/remove modes * (H4). Merging first guarantees the spans handed to substitution are * disjoint, so no substitution can invalidate another's offsets. */ export declare function redactPii(text: string, matches: PiiMatch[], config?: RedactionConfig): string; //# sourceMappingURL=redact.d.ts.map