//#region src/server/abort.d.ts declare class AbortRedirect extends Error { url: string; statusCode: number; constructor(url: string, statusCode?: number); } /** * Interrupt the current rendering and redirect the user to a new URL. * Use with 'throw' inside +data.ts or in middleware. * @param url The URL to redirect to * @param statusCode Optional: the HTTP status code for the redirect (default is 302) * @example throw redirect('/login') */ declare function redirect(url: string, statusCode?: number): AbortRedirect; declare class AbortRender extends Error { statusCode: number; reason?: unknown; constructor(statusCode: number, reason?: unknown); } /** * Interrupt the current rendering and display the error page. * Always use with 'throw': throw render(404, 'Not Found') * * @param statusCode The HTTP status code (e.g. 404, 401, 500) * @param reason Optional: the reason for the error to display in the UI */ declare function render(statusCode: number, reason?: unknown): AbortRender; //#endregion export { AbortRedirect, AbortRender, redirect, render };