import { _ as defineDiagnostics, a as Diagnostic, c as DiagnosticDefinition, d as DiagnosticJSON, f as DiagnosticReporter, g as createConsoleReporter, h as InferDiagnosticCodes, i as DefineDiagnosticsOptions, l as DiagnosticHandle, m as InferCodesData, n as ConsoleMethod, o as DiagnosticCallParams, p as Diagnostics, r as ConsoleReporterOptions, s as DiagnosticCodes, t as AnyDiagnosticReporter, u as DiagnosticInit, v as ValueOrFn } from "./diagnostic-CuPl5K1s.mjs"; //#region src/formatters/plain.d.ts /** * Renders a diagnostic into a multi-line, unicode-decorated string suitable * for terminal output. The first line is `[] `; optional * details (`fix`, `sources`, `docs`) follow with `├▶`/`╰▶` connectors. */ export declare function formatDiagnostic(diagnostic: Diagnostic): string; //#endregion //#region src/prod-diagnostics.d.ts /** * Options for {@link defineProdDiagnostics}. A lean subset of * {@link DefineDiagnosticsOptions}: no `codes` map (the proxy serves any code), * only what is needed to keep behaviour correct in production. */ interface DefineProdDiagnosticsOptions { /** * Base URL or resolver for documentation links, identical to * {@link DefineDiagnosticsOptions.docsBase}. The docs URL is derived from the * accessed code at call time, so links survive even without the catalog. */ docsBase?: string | ((code: string) => string | undefined); /** * Reporters called every time a diagnostic is produced. Omitted by default in * production builds; the strip plugin can copy them into the prod branch when * prod-time reporting (e.g. telemetry) is desired. */ reporters?: Reporters; } /** * Production counterpart to {@link defineDiagnostics}. Returns a `Proxy` that * builds a minimal {@link Diagnostic} for any accessed code: the code becomes * the instance `name`, `docs` is derived from `docsBase`, and `why` points to * the docs URL when one exists (empty otherwise, so the thrown header is just * the code). It carries no catalog text or data, so it stays tiny in a bundle. * * The strip plugin (`@nostics/unplugin`) can rewrite a `defineDiagnostics()` * call into a `process.env.NODE_ENV === 'production'` ternary that selects this * factory in production, dropping every `why`/`fix` string from the bundle. * * @example * ```ts * const diagnostics = defineProdDiagnostics({ docsBase: 'https://docs.example.com' }) * throw diagnostics.NUXT_B2011() // NUXT_B2011: https://docs.example.com/nuxt_b2011 * ``` */ export declare function defineProdDiagnostics, const Reporters extends readonly AnyDiagnosticReporter[] = readonly AnyDiagnosticReporter[]>(options?: DefineProdDiagnosticsOptions): Diagnostics; //#endregion export { type AnyDiagnosticReporter, type ConsoleMethod, type ConsoleReporterOptions, type DefineDiagnosticsOptions, type DefineProdDiagnosticsOptions, Diagnostic, type DiagnosticCallParams, type DiagnosticDefinition, type DiagnosticHandle, type DiagnosticInit, type DiagnosticJSON, type DiagnosticReporter, type Diagnostics, type InferCodesData, type InferDiagnosticCodes, type ValueOrFn as _ValueOrFn, createConsoleReporter, defineDiagnostics }; //# sourceMappingURL=index.d.mts.map