import { NuxtPayload } from "../types.js"; import { NuxtApp } from "../nuxt.js"; import { Ref } from "vue"; import { H3Error } from "@nuxt/nitro-server/h3"; //#region src/app/composables/error.d.ts declare const NUXT_ERROR_SIGNATURE: "__nuxt_error"; /** @since 3.0.0 */ declare const useError: () => Ref; interface NuxtError extends Omit, 'statusCode' | 'statusMessage'>, Error { readonly __nuxt_error?: true; error?: true; status?: number; statusText?: string; /** @deprecated Use `status` */ statusCode?: H3Error['statusCode']; /** @deprecated Use `statusText` */ statusMessage?: H3Error['statusMessage']; } /** @since 3.0.0 */ declare const showError: (error: string | Error | (Partial> & { status?: number; statusText?: string; })) => NuxtError; /** * Notify the app of an error caught for a crawler without rendering the error * page, so the bot indexes the server-rendered HTML instead (#32137, #35338). * * @internal */ declare const _notifyCrawlerError: (nuxtApp: NuxtApp, error: Error) => Promise | void; /** * Show the error page unless the current client is a crawler, in which case the * bot receives the already server-rendered HTML instead (#32137, #35338). * * @internal */ declare const _showErrorUnlessCrawler: (nuxtApp: NuxtApp, error: Error) => Promise; /** @since 3.0.0 */ declare const clearError: (options?: { redirect?: string; }) => Promise; /** @since 3.0.0 */ declare const isNuxtError: (error: unknown) => error is NuxtError; /** @since 3.0.0 */ declare const createError: (error: string | Error | Partial>) => NuxtError; //#endregion export { NUXT_ERROR_SIGNATURE, NuxtError, _notifyCrawlerError, _showErrorUnlessCrawler, clearError, createError, isNuxtError, showError, useError };