securityos/node_modules/next/dist/server/app-render/create-error-handler.d.ts

19 lines
555 B
TypeScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
export type ErrorHandler = (err: any) => string;
/**
* Create error handler for renderers.
* Tolerate dynamic server errors during prerendering so console
* isn't spammed with unactionable errors
*/
export declare function createErrorHandler({
/**
* Used for debugging
*/
_source, dev, isNextExport, errorLogger, capturedErrors, allCapturedErrors, }: {
_source: string;
dev?: boolean;
isNextExport?: boolean;
errorLogger?: (err: any) => Promise<void>;
capturedErrors: Error[];
allCapturedErrors?: Error[];
}): ErrorHandler;