import MagicString from 'magic-string'; /** * Analyse compiled TypeScript source and return the set of imported names * that are only referenced in type positions (type annotations, implements * clauses, generics, etc.) and can safely be elided. * * Uses oxc-parser for fast, Rust-based AST analysis — no type-checker needed. */ export declare function detectTypeOnlyImportNames(code: string): Set; /** * Elide import specifiers (or entire import declarations) for names that are * only used in type positions. Operates on the compiler's TypeScript output * (before OXC strips remaining TS syntax). * * Returns the modified source code, or the original if nothing was elided. */ export declare function elideTypeOnlyImports(code: string): string; /** * Elide type-only imports directly on a MagicString instance, so that * subsequent `ms.generateMap()` calls produce an accurate sourcemap. * * Detects type-only names from `ms.toString()` (the fully-mutated code), * but reads import positions from `ms.original` (the coordinate system * MagicString expects). */ export declare function elideTypeOnlyImportsMagicString(ms: MagicString): void;