import * as estree from 'estree'; import { Settings } from '@xyd-js/core'; import { R as RemarkMdxTocOptions } from './mdToc-NBBxMJ4l.js'; declare module 'estree' { export interface Decorator extends estree.BaseNode { type: 'Decorator'; expression: estree.Expression; } interface PropertyDefinition { decorators: estree.Decorator[]; } interface MethodDefinition { decorators: estree.Decorator[]; } interface BaseClass { decorators: estree.Decorator[]; } } // utils type NullValue = null | undefined | void; type MaybeArray = T | T[]; type MaybePromise = T | Promise; type PartialNull = { [P in keyof T]: T[P] | null; }; interface RollupError extends RollupLog { name?: string | undefined; stack?: string | undefined; watchFiles?: string[] | undefined; } interface RollupLog { binding?: string | undefined; cause?: unknown | undefined; code?: string | undefined; exporter?: string | undefined; frame?: string | undefined; hook?: string | undefined; id?: string | undefined; ids?: string[] | undefined; loc?: { column: number; file?: string | undefined; line: number; }; message: string; meta?: any | undefined; names?: string[] | undefined; plugin?: string | undefined; pluginCode?: unknown | undefined; pos?: number | undefined; reexporter?: string | undefined; stack?: string | undefined; url?: string | undefined; } type LogLevel = 'warn' | 'info' | 'debug'; type LogLevelOption = LogLevel | 'silent'; type SourceMapSegment = | [number] | [number, number, number, number] | [number, number, number, number, number]; interface ExistingDecodedSourceMap { file?: string | undefined; readonly mappings: SourceMapSegment[][]; names: string[]; sourceRoot?: string | undefined; sources: string[]; sourcesContent?: string[] | undefined; version: number; x_google_ignoreList?: number[] | undefined; } interface ExistingRawSourceMap { file?: string | undefined; mappings: string; names: string[]; sourceRoot?: string | undefined; sources: string[]; sourcesContent?: string[] | undefined; version: number; x_google_ignoreList?: number[] | undefined; } type DecodedSourceMapOrMissing = | { missing: true; plugin: string; } | (ExistingDecodedSourceMap & { missing?: false | undefined }); interface SourceMap { file: string; mappings: string; names: string[]; sources: string[]; sourcesContent?: string[] | undefined; version: number; debugId?: string | undefined; toString(): string; toUrl(): string; } type SourceMapInput = ExistingRawSourceMap | string | null | { mappings: '' }; interface ModuleOptions { attributes: Record; meta: CustomPluginOptions; moduleSideEffects: boolean | 'no-treeshake'; syntheticNamedExports: boolean | string; } interface SourceDescription extends Partial> { ast?: ProgramNode | undefined; code: string; map?: SourceMapInput | undefined; } interface TransformModuleJSON { ast?: ProgramNode | undefined; code: string; safeVariableNames: Record | null; // note if plugins use new this.cache to opt-out auto transform cache customTransformCache: boolean; originalCode: string; originalSourcemap: ExistingDecodedSourceMap | null; sourcemapChain: DecodedSourceMapOrMissing[]; transformDependencies: string[]; } interface ModuleJSON extends TransformModuleJSON, ModuleOptions { safeVariableNames: Record | null; ast: ProgramNode; dependencies: string[]; id: string; resolvedIds: ResolvedIdMap; transformFiles: EmittedFile[] | undefined; } interface PluginCache { delete(id: string): boolean; get(id: string): T; has(id: string): boolean; set(id: string, value: T): void; } type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void; interface MinimalPluginContext { debug: LoggingFunction; error: (error: RollupError | string) => never; info: LoggingFunction; meta: PluginContextMeta; warn: LoggingFunction; } interface EmittedAsset { fileName?: string | undefined; name?: string | undefined; needsCodeReference?: boolean | undefined; originalFileName?: string | null | undefined; source?: string | Uint8Array | undefined; type: 'asset'; } interface EmittedChunk { fileName?: string | undefined; id: string; implicitlyLoadedAfterOneOf?: string[] | undefined; importer?: string | undefined; name?: string | undefined; preserveSignature?: PreserveEntrySignaturesOption | undefined; type: 'chunk'; } interface EmittedPrebuiltChunk { code: string; exports?: string[] | undefined; fileName: string; map?: SourceMap | undefined; sourcemapFileName?: string | undefined; type: 'prebuilt-chunk'; } type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk; type EmitFile = (emittedFile: EmittedFile) => string; interface ModuleInfo extends ModuleOptions { ast: ProgramNode | null; code: string | null; dynamicImporters: readonly string[]; dynamicallyImportedIdResolutions: readonly ResolvedId[]; dynamicallyImportedIds: readonly string[]; exportedBindings: Record | null; exports: string[] | null; safeVariableNames: Record | null; hasDefaultExport: boolean | null; id: string; implicitlyLoadedAfterOneOf: readonly string[]; implicitlyLoadedBefore: readonly string[]; importedIdResolutions: readonly ResolvedId[]; importedIds: readonly string[]; importers: readonly string[]; isEntry: boolean; isExternal: boolean; isIncluded: boolean | null; } type GetModuleInfo = (moduleId: string) => ModuleInfo | null; // eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style -- this is an interface so that it can be extended by plugins interface CustomPluginOptions { [plugin: string]: any; } type LoggingFunctionWithPosition = ( log: RollupLog | string | (() => RollupLog | string), pos?: number | { column: number; line: number } ) => void; type ParseAst = ( input: string, options?: { allowReturnOutsideFunction?: boolean; jsx?: boolean } ) => ProgramNode; // declare AbortSignal here for environments without DOM lib or @types/node declare global { // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface AbortSignal {} } interface PluginContext extends MinimalPluginContext { addWatchFile: (id: string) => void; cache: PluginCache; debug: LoggingFunction; emitFile: EmitFile; error: (error: RollupError | string) => never; fs: RollupFsModule; getFileName: (fileReferenceId: string) => string; getModuleIds: () => IterableIterator; getModuleInfo: GetModuleInfo; getWatchFiles: () => string[]; info: LoggingFunction; load: ( options: { id: string; resolveDependencies?: boolean } & Partial> ) => Promise; parse: ParseAst; resolve: ( source: string, importer?: string, options?: { attributes?: Record; custom?: CustomPluginOptions; isEntry?: boolean; skipSelf?: boolean; } ) => Promise; setAssetSource: (assetReferenceId: string, source: string | Uint8Array) => void; warn: LoggingFunction; } interface PluginContextMeta { rollupVersion: string; watchMode: boolean; } type StringOrRegExp = string | RegExp; type StringFilter = | MaybeArray | { include?: MaybeArray | undefined; exclude?: MaybeArray | undefined; }; interface HookFilter { id?: StringFilter | undefined; code?: StringFilter | undefined; } interface ResolvedId extends ModuleOptions { external: boolean | 'absolute'; id: string; resolvedBy: string; } type ResolvedIdMap = Record; interface PartialResolvedId extends Partial> { external?: boolean | 'absolute' | 'relative' | undefined; id: string; resolvedBy?: string | undefined; } type ResolveIdResult = string | NullValue | false | PartialResolvedId; type ResolveIdHook = ( this: PluginContext, source: string, importer: string | undefined, options: { attributes: Record; custom?: CustomPluginOptions; isEntry: boolean } ) => ResolveIdResult; type ShouldTransformCachedModuleHook = ( this: PluginContext, options: { ast: ProgramNode; code: string; id: string; meta: CustomPluginOptions; moduleSideEffects: boolean | 'no-treeshake'; resolvedSources: ResolvedIdMap; syntheticNamedExports: boolean | string; } ) => boolean | NullValue; type IsExternal = ( source: string, importer: string | undefined, isResolved: boolean ) => boolean; type HasModuleSideEffects = (id: string, external: boolean) => boolean; type LoadResult = SourceDescription | string | NullValue; type LoadHook = (this: PluginContext, id: string) => LoadResult; interface TransformPluginContext extends PluginContext { debug: LoggingFunctionWithPosition; error: (error: RollupError | string, pos?: number | { column: number; line: number }) => never; getCombinedSourcemap: () => SourceMap; info: LoggingFunctionWithPosition; warn: LoggingFunctionWithPosition; } type TransformResult = string | NullValue | Partial; type TransformHook = ( this: TransformPluginContext, code: string, id: string ) => TransformResult; type ModuleParsedHook = (this: PluginContext, info: ModuleInfo) => void; type RenderChunkHook = ( this: PluginContext, code: string, chunk: RenderedChunk, options: NormalizedOutputOptions, meta: { chunks: Record } ) => { code: string; map?: SourceMapInput } | string | NullValue; type ResolveDynamicImportHook = ( this: PluginContext, specifier: string | AstNode, importer: string, options: { attributes: Record } ) => ResolveIdResult; type ResolveImportMetaHook = ( this: PluginContext, property: string | null, options: { chunkId: string; format: InternalModuleFormat; moduleId: string } ) => string | NullValue; type ResolveFileUrlHook = ( this: PluginContext, options: { chunkId: string; fileName: string; format: InternalModuleFormat; moduleId: string; referenceId: string; relativePath: string; } ) => string | NullValue; type AddonHookFunction = ( this: PluginContext, chunk: RenderedChunk ) => string | Promise; type AddonHook = string | AddonHookFunction; type ChangeEvent = 'create' | 'update' | 'delete'; type WatchChangeHook = ( this: PluginContext, id: string, change: { event: ChangeEvent } ) => void; type OutputBundle = Record; type PreRenderedChunkWithFileName = PreRenderedChunk & { fileName: string }; interface ImportedInternalChunk { type: 'internal'; fileName: string; resolvedImportPath: string; chunk: PreRenderedChunk; } interface ImportedExternalChunk { type: 'external'; fileName: string; resolvedImportPath: string; } type DynamicImportTargetChunk = ImportedInternalChunk | ImportedExternalChunk; interface FunctionPluginHooks { augmentChunkHash: (this: PluginContext, chunk: RenderedChunk) => string | void; buildEnd: (this: PluginContext, error?: Error) => void; buildStart: (this: PluginContext, options: NormalizedInputOptions) => void; closeBundle: (this: PluginContext, error?: Error) => void; closeWatcher: (this: PluginContext) => void; generateBundle: ( this: PluginContext, options: NormalizedOutputOptions, bundle: OutputBundle, isWrite: boolean ) => void; load: LoadHook; moduleParsed: ModuleParsedHook; onLog: (this: MinimalPluginContext, level: LogLevel, log: RollupLog) => boolean | NullValue; options: (this: MinimalPluginContext, options: InputOptions) => InputOptions | NullValue; outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions | NullValue; renderChunk: RenderChunkHook; renderDynamicImport: ( this: PluginContext, options: { customResolution: string | null; format: InternalModuleFormat; moduleId: string; targetModuleId: string | null; chunk: PreRenderedChunkWithFileName; targetChunk: PreRenderedChunkWithFileName | null; getTargetChunkImports: () => DynamicImportTargetChunk[] | null; } ) => { left: string; right: string } | NullValue; renderError: (this: PluginContext, error?: Error) => void; renderStart: ( this: PluginContext, outputOptions: NormalizedOutputOptions, inputOptions: NormalizedInputOptions ) => void; resolveDynamicImport: ResolveDynamicImportHook; resolveFileUrl: ResolveFileUrlHook; resolveId: ResolveIdHook; resolveImportMeta: ResolveImportMetaHook; shouldTransformCachedModule: ShouldTransformCachedModuleHook; transform: TransformHook; watchChange: WatchChangeHook; writeBundle: ( this: PluginContext, options: NormalizedOutputOptions, bundle: OutputBundle ) => void; } type OutputPluginHooks = | 'augmentChunkHash' | 'generateBundle' | 'outputOptions' | 'renderChunk' | 'renderDynamicImport' | 'renderError' | 'renderStart' | 'resolveFileUrl' | 'resolveImportMeta' | 'writeBundle'; type SyncPluginHooks = | 'augmentChunkHash' | 'onLog' | 'outputOptions' | 'renderDynamicImport' | 'resolveFileUrl' | 'resolveImportMeta'; type AsyncPluginHooks = Exclude; type FirstPluginHooks = | 'load' | 'renderDynamicImport' | 'resolveDynamicImport' | 'resolveFileUrl' | 'resolveId' | 'resolveImportMeta' | 'shouldTransformCachedModule'; type SequentialPluginHooks = | 'augmentChunkHash' | 'generateBundle' | 'onLog' | 'options' | 'outputOptions' | 'renderChunk' | 'transform'; type ParallelPluginHooks = Exclude< keyof FunctionPluginHooks | AddonHooks, FirstPluginHooks | SequentialPluginHooks >; type AddonHooks = 'banner' | 'footer' | 'intro' | 'outro'; type MakeAsync = Function_ extends ( this: infer This, ...parameters: infer Arguments ) => infer Return ? (this: This, ...parameters: Arguments) => Return | Promise : never; // eslint-disable-next-line @typescript-eslint/no-empty-object-type type ObjectHook = T | ({ handler: T; order?: 'pre' | 'post' | null } & O); type HookFilterExtension = K extends 'transform' ? { filter?: HookFilter | undefined } : K extends 'load' ? { filter?: Pick | undefined } : K extends 'resolveId' ? { filter?: { id?: StringFilter | undefined } } | undefined : // eslint-disable-next-line @typescript-eslint/no-empty-object-type {}; type PluginHooks = { [K in keyof FunctionPluginHooks]: ObjectHook< K extends AsyncPluginHooks ? MakeAsync : FunctionPluginHooks[K], // eslint-disable-next-line @typescript-eslint/no-empty-object-type HookFilterExtension & (K extends ParallelPluginHooks ? { sequential?: boolean } : {}) >; }; interface OutputPlugin extends Partial<{ [K in OutputPluginHooks]: PluginHooks[K] }>, Partial>> { cacheKey?: string | undefined; name: string; version?: string | undefined; } interface Plugin extends OutputPlugin, Partial { // for inter-plugin communication api?: A | undefined; } type JsxPreset = 'react' | 'react-jsx' | 'preserve' | 'preserve-react'; type NormalizedJsxOptions = | NormalizedJsxPreserveOptions | NormalizedJsxClassicOptions | NormalizedJsxAutomaticOptions; interface NormalizedJsxPreserveOptions { factory: string | null; fragment: string | null; importSource: string | null; mode: 'preserve'; } interface NormalizedJsxClassicOptions { factory: string; fragment: string; importSource: string | null; mode: 'classic'; } interface NormalizedJsxAutomaticOptions { factory: string; importSource: string | null; jsxImportSource: string; mode: 'automatic'; } type JsxOptions = Partial & { preset?: JsxPreset | undefined; }; type TreeshakingPreset = 'smallest' | 'safest' | 'recommended'; interface NormalizedTreeshakingOptions { annotations: boolean; correctVarValueBeforeDeclaration: boolean; manualPureFunctions: readonly string[]; moduleSideEffects: HasModuleSideEffects; propertyReadSideEffects: boolean | 'always'; tryCatchDeoptimization: boolean; unknownGlobalSideEffects: boolean; } interface TreeshakingOptions extends Partial< Omit > { moduleSideEffects?: ModuleSideEffectsOption | undefined; preset?: TreeshakingPreset | undefined; } interface ManualChunkMeta { getModuleIds: () => IterableIterator; getModuleInfo: GetModuleInfo; } type GetManualChunk = (id: string, meta: ManualChunkMeta) => string | NullValue; type ExternalOption = | (string | RegExp)[] | string | RegExp | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | NullValue); type GlobalsOption = Record | ((name: string) => string); type InputOption = string | string[] | Record; type ManualChunksOption = Record | GetManualChunk; type LogHandlerWithDefault = ( level: LogLevel, log: RollupLog, defaultHandler: LogOrStringHandler ) => void; type LogOrStringHandler = (level: LogLevel | 'error', log: RollupLog | string) => void; type LogHandler = (level: LogLevel, log: RollupLog) => void; type ModuleSideEffectsOption = boolean | 'no-external' | string[] | HasModuleSideEffects; type PreserveEntrySignaturesOption = false | 'strict' | 'allow-extension' | 'exports-only'; type SourcemapPathTransformOption = ( relativeSourcePath: string, sourcemapPath: string ) => string; type SourcemapIgnoreListOption = ( relativeSourcePath: string, sourcemapPath: string ) => boolean; type InputPluginOption = MaybePromise; interface InputOptions { cache?: boolean | RollupCache | undefined; context?: string | undefined; experimentalCacheExpiry?: number | undefined; experimentalLogSideEffects?: boolean | undefined; external?: ExternalOption | undefined; fs?: RollupFsModule | undefined; input?: InputOption | undefined; jsx?: false | JsxPreset | JsxOptions | undefined; logLevel?: LogLevelOption | undefined; makeAbsoluteExternalsRelative?: boolean | 'ifRelativeSource' | undefined; maxParallelFileOps?: number | undefined; moduleContext?: ((id: string) => string | NullValue) | Record | undefined; onLog?: LogHandlerWithDefault | undefined; onwarn?: WarningHandlerWithDefault | undefined; perf?: boolean | undefined; plugins?: InputPluginOption | undefined; preserveEntrySignatures?: PreserveEntrySignaturesOption | undefined; preserveSymlinks?: boolean | undefined; shimMissingExports?: boolean | undefined; strictDeprecations?: boolean | undefined; treeshake?: boolean | TreeshakingPreset | TreeshakingOptions | undefined; watch?: WatcherOptions | false | undefined; } interface NormalizedInputOptions { cache: false | undefined | RollupCache; context: string; experimentalCacheExpiry: number; experimentalLogSideEffects: boolean; external: IsExternal; fs: RollupFsModule; input: string[] | Record; jsx: false | NormalizedJsxOptions; logLevel: LogLevelOption; makeAbsoluteExternalsRelative: boolean | 'ifRelativeSource'; maxParallelFileOps: number; moduleContext: (id: string) => string; onLog: LogHandler; perf: boolean; plugins: Plugin[]; preserveEntrySignatures: PreserveEntrySignaturesOption; preserveSymlinks: boolean; shimMissingExports: boolean; strictDeprecations: boolean; treeshake: false | NormalizedTreeshakingOptions; } type InternalModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd'; type ImportAttributesKey = 'with' | 'assert'; type ModuleFormat = InternalModuleFormat | 'commonjs' | 'esm' | 'module' | 'systemjs'; type GeneratedCodePreset = 'es5' | 'es2015'; interface NormalizedGeneratedCodeOptions { arrowFunctions: boolean; constBindings: boolean; objectShorthand: boolean; reservedNamesAsProps: boolean; symbols: boolean; } interface GeneratedCodeOptions extends Partial { preset?: GeneratedCodePreset | undefined; } type OptionsPaths = Record | ((id: string) => string); type InteropType = 'compat' | 'auto' | 'esModule' | 'default' | 'defaultOnly'; type GetInterop = (id: string | null) => InteropType; type AmdOptions = ( | { autoId?: false | undefined; id: string; } | { autoId: true; basePath?: string | undefined; id?: undefined | undefined; } | { autoId?: false | undefined; id?: undefined | undefined; } ) & { define?: string | undefined; forceJsExtensionForImports?: boolean | undefined; }; type NormalizedAmdOptions = ( | { autoId: false; id?: string | undefined; } | { autoId: true; basePath: string; } ) & { define: string; forceJsExtensionForImports: boolean; }; type AddonFunction = (chunk: RenderedChunk) => string | Promise; type OutputPluginOption = MaybePromise; type HashCharacters = 'base64' | 'base36' | 'hex'; interface OutputOptions { amd?: AmdOptions | undefined; assetFileNames?: string | ((chunkInfo: PreRenderedAsset) => string) | undefined; banner?: string | AddonFunction | undefined; chunkFileNames?: string | ((chunkInfo: PreRenderedChunk) => string) | undefined; compact?: boolean | undefined; // only required for bundle.write dir?: string | undefined; dynamicImportInCjs?: boolean | undefined; entryFileNames?: string | ((chunkInfo: PreRenderedChunk) => string) | undefined; esModule?: boolean | 'if-default-prop' | undefined; experimentalMinChunkSize?: number | undefined; exports?: 'default' | 'named' | 'none' | 'auto' | undefined; extend?: boolean | undefined; /** @deprecated Use "externalImportAttributes" instead. */ externalImportAssertions?: boolean | undefined; externalImportAttributes?: boolean | undefined; externalLiveBindings?: boolean | undefined; // only required for bundle.write file?: string | undefined; footer?: string | AddonFunction | undefined; format?: ModuleFormat | undefined; freeze?: boolean | undefined; generatedCode?: GeneratedCodePreset | GeneratedCodeOptions | undefined; globals?: GlobalsOption | undefined; hashCharacters?: HashCharacters | undefined; hoistTransitiveImports?: boolean | undefined; importAttributesKey?: ImportAttributesKey | undefined; indent?: string | boolean | undefined; inlineDynamicImports?: boolean | undefined; interop?: InteropType | GetInterop | undefined; intro?: string | AddonFunction | undefined; manualChunks?: ManualChunksOption | undefined; minifyInternalExports?: boolean | undefined; name?: string | undefined; noConflict?: boolean | undefined; /** @deprecated This will be the new default in Rollup 5. */ onlyExplicitManualChunks?: boolean | undefined; outro?: string | AddonFunction | undefined; paths?: OptionsPaths | undefined; plugins?: OutputPluginOption | undefined; preserveModules?: boolean | undefined; preserveModulesRoot?: string | undefined; reexportProtoFromExternal?: boolean | undefined; sanitizeFileName?: boolean | ((fileName: string) => string) | undefined; sourcemap?: boolean | 'inline' | 'hidden' | undefined; sourcemapBaseUrl?: string | undefined; sourcemapExcludeSources?: boolean | undefined; sourcemapFile?: string | undefined; sourcemapFileNames?: string | ((chunkInfo: PreRenderedChunk) => string) | undefined; sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | undefined; sourcemapPathTransform?: SourcemapPathTransformOption | undefined; sourcemapDebugIds?: boolean | undefined; strict?: boolean | undefined; systemNullSetters?: boolean | undefined; validate?: boolean | undefined; virtualDirname?: string | undefined; } interface NormalizedOutputOptions { amd: NormalizedAmdOptions; assetFileNames: string | ((chunkInfo: PreRenderedAsset) => string); banner: AddonFunction; chunkFileNames: string | ((chunkInfo: PreRenderedChunk) => string); compact: boolean; dir: string | undefined; dynamicImportInCjs: boolean; entryFileNames: string | ((chunkInfo: PreRenderedChunk) => string); esModule: boolean | 'if-default-prop'; experimentalMinChunkSize: number; exports: 'default' | 'named' | 'none' | 'auto'; extend: boolean; /** @deprecated Use "externalImportAttributes" instead. */ externalImportAssertions: boolean; externalImportAttributes: boolean; externalLiveBindings: boolean; file: string | undefined; footer: AddonFunction; format: InternalModuleFormat; freeze: boolean; generatedCode: NormalizedGeneratedCodeOptions; globals: GlobalsOption; hashCharacters: HashCharacters; hoistTransitiveImports: boolean; importAttributesKey: ImportAttributesKey; indent: true | string; inlineDynamicImports: boolean; interop: GetInterop; intro: AddonFunction; manualChunks: ManualChunksOption; minifyInternalExports: boolean; name: string | undefined; noConflict: boolean; onlyExplicitManualChunks: boolean; outro: AddonFunction; paths: OptionsPaths; plugins: OutputPlugin[]; preserveModules: boolean; preserveModulesRoot: string | undefined; reexportProtoFromExternal: boolean; sanitizeFileName: (fileName: string) => string; sourcemap: boolean | 'inline' | 'hidden'; sourcemapBaseUrl: string | undefined; sourcemapExcludeSources: boolean; sourcemapFile: string | undefined; sourcemapFileNames: string | ((chunkInfo: PreRenderedChunk) => string) | undefined; sourcemapIgnoreList: SourcemapIgnoreListOption; sourcemapPathTransform: SourcemapPathTransformOption | undefined; sourcemapDebugIds: boolean; strict: boolean; systemNullSetters: boolean; validate: boolean; virtualDirname: string; } type WarningHandlerWithDefault = ( warning: RollupLog, defaultHandler: LoggingFunction ) => void; interface PreRenderedAsset { /** @deprecated Use "names" instead. */ name: string | undefined; names: string[]; /** @deprecated Use "originalFileNames" instead. */ originalFileName: string | null; originalFileNames: string[]; source: string | Uint8Array; type: 'asset'; } interface OutputAsset extends PreRenderedAsset { fileName: string; needsCodeReference: boolean; } interface RenderedModule { readonly code: string | null; originalLength: number; removedExports: string[]; renderedExports: string[]; renderedLength: number; } interface PreRenderedChunk { exports: string[]; facadeModuleId: string | null; isDynamicEntry: boolean; isEntry: boolean; isImplicitEntry: boolean; moduleIds: string[]; name: string; type: 'chunk'; } interface RenderedChunk extends PreRenderedChunk { dynamicImports: string[]; fileName: string; implicitlyLoadedBefore: string[]; importedBindings: Record; imports: string[]; modules: Record; referencedFiles: string[]; } interface OutputChunk extends RenderedChunk { code: string; map: SourceMap | null; sourcemapFileName: string | null; preliminaryFileName: string; } type SerializablePluginCache = Record; interface RollupCache { modules: ModuleJSON[]; plugins?: Record; } interface ChokidarOptions { alwaysStat?: boolean | undefined; atomic?: boolean | number | undefined; awaitWriteFinish?: | { pollInterval?: number | undefined; stabilityThreshold?: number | undefined; } | boolean | undefined; binaryInterval?: number | undefined; cwd?: string | undefined; depth?: number | undefined; disableGlobbing?: boolean | undefined; followSymlinks?: boolean | undefined; ignoreInitial?: boolean | undefined; ignorePermissionErrors?: boolean | undefined; ignored?: any | undefined; interval?: number | undefined; persistent?: boolean | undefined; useFsEvents?: boolean | undefined; usePolling?: boolean | undefined; } interface WatcherOptions { allowInputInsideOutputPath?: boolean | undefined; buildDelay?: number | undefined; chokidar?: ChokidarOptions | undefined; clearScreen?: boolean | undefined; exclude?: string | RegExp | (string | RegExp)[] | undefined; include?: string | RegExp | (string | RegExp)[] | undefined; skipWrite?: boolean | undefined; onInvalidate?: ((id: string) => void) | undefined; } interface AstNodeLocation { end: number; start: number; } type OmittedEstreeKeys = | 'loc' | 'range' | 'leadingComments' | 'trailingComments' | 'innerComments' | 'comments'; type RollupAstNode = Omit & AstNodeLocation; type ProgramNode = RollupAstNode; type AstNode = RollupAstNode; interface RollupFsModule { appendFile( path: string, data: string | Uint8Array, options?: { encoding?: BufferEncoding | null; mode?: string | number; flag?: string | number } ): Promise; copyFile(source: string, destination: string, mode?: string | number): Promise; mkdir(path: string, options?: { recursive?: boolean; mode?: string | number }): Promise; mkdtemp(prefix: string): Promise; readdir(path: string, options?: { withFileTypes?: false }): Promise; readdir(path: string, options?: { withFileTypes: true }): Promise; readFile( path: string, options?: { encoding?: null; flag?: string | number; signal?: AbortSignal } ): Promise; readFile( path: string, options?: { encoding: BufferEncoding; flag?: string | number; signal?: AbortSignal } ): Promise; realpath(path: string): Promise; rename(oldPath: string, newPath: string): Promise; rmdir(path: string, options?: { recursive?: boolean }): Promise; stat(path: string): Promise; lstat(path: string): Promise; unlink(path: string): Promise; writeFile( path: string, data: string | Uint8Array, options?: { encoding?: BufferEncoding | null; mode?: string | number; flag?: string | number } ): Promise; } type BufferEncoding = | 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex'; interface RollupDirectoryEntry { isFile(): boolean; isDirectory(): boolean; isSymbolicLink(): boolean; name: string; } interface RollupFileStats { isFile(): boolean; isDirectory(): boolean; isSymbolicLink(): boolean; size: number; mtime: Date; ctime: Date; atime: Date; birthtime: Date; } interface VitePluginInterface { toc: RemarkMdxTocOptions; settings: Settings; } declare function vitePlugins(options: VitePluginInterface): Promise; export { type VitePluginInterface, vitePlugins };