import { default as default_2 } from '@typescript/typescript6'; import { Plugin } from 'vite'; export declare interface BeforeWriteFileResult { filePath?: string; content?: string; } /** * The main plugin function. The returned object implements the Vite plugin * interface and hooks into the build lifecycle to generate, transform, and emit * declaration files based on the provided options and resolvers. The plugin * manages internal state across hooks to track the declaration graph and ensure * that all relevant files are processed and emitted correctly, even in watch * mode with incremental changes. */ export declare function bundleDts(options?: DtsPluginOptions): Plugin; export declare interface DtsOutputFile { path: string; content: string; } export declare interface DtsPluginOptions { root?: string; entryRoot?: string; outDir?: string | string[]; tsconfigPath?: string; logLevel?: 'silent' | 'error' | 'warn' | 'info'; staticImport?: boolean; clearPureImport?: boolean; insertTypesEntry?: boolean; rollupTypes?: boolean; pathsToAliases?: boolean; aliasesExclude?: Array; rollupConfig?: Record; rollupOptions?: Record; bundledPackages?: string[]; resolvers?: DtsResolver[]; copyDtsFiles?: boolean; declarationOnly?: boolean; strictOutput?: boolean; include?: string | string[]; exclude?: string | string[]; compilerOptions?: default_2.CompilerOptions; afterDiagnostic?: (diagnostics: readonly default_2.Diagnostic[]) => MaybePromise; beforeWriteFile?: (filePath: string, content: string) => MaybePromise; afterRollup?: (result: unknown) => MaybePromise; afterBuild?: (emittedFiles: ReadonlyMap) => MaybePromise; } export declare interface DtsResolver { name?: string; supports(id: string): boolean; transform(context: DtsResolverContext): MaybePromise; } export declare interface DtsResolverContext { id: string; code: string; root: string; outDir: string; host: default_2.CompilerHost; program: default_2.Program; } export declare interface DtsResolverResult { outputs: DtsOutputFile[]; emitSkipped?: boolean; diagnostics?: readonly default_2.Diagnostic[]; } export declare function editSourceMapDir(content: string, fromDir: string, toDir: string): boolean | string; export declare type MaybePromise = T | Promise; export declare interface PathAlias { find: string | RegExp; replacement: string; } export { }