vite-plugin-react-server
Version:
Vite plugin for React Server Components (RSC)
27 lines • 985 B
TypeScript
/**
* Centralized panic threshold handling logic
*
* This module provides a single place to handle panic threshold decisions
* instead of scattering the logic across multiple files.
*/
import type { PanicThreshold } from "../types.js";
export interface PanicThresholdOptions {
panicThreshold: PanicThreshold;
critical?: boolean;
logger?: any;
context?: string;
}
/**
* Determines if an error should cause a panic based on panic threshold settings
*/
export declare function shouldCausePanic(error: unknown, options: PanicThresholdOptions): boolean;
/**
* Handles an error based on panic threshold settings
* Returns the error if it should cause a panic, null otherwise
*/
export declare function handlePanicThreshold(error: unknown, options: PanicThresholdOptions): Error | null;
/**
* Checks if an error is already marked as a panic error
*/
export declare function isPanicError(error: unknown): boolean;
//# sourceMappingURL=panicThresholdHandler.d.ts.map