9 lines
359 B
TypeScript
9 lines
359 B
TypeScript
export interface GlobalErrorUtils {
|
|
getGlobalHandler?: () => (error: unknown, isFatal?: boolean) => void;
|
|
setGlobalHandler?: (handler: (error: unknown, isFatal?: boolean) => void) => void;
|
|
}
|
|
|
|
export function getGlobalErrorUtils(): GlobalErrorUtils | undefined {
|
|
return (globalThis as typeof globalThis & { ErrorUtils?: GlobalErrorUtils }).ErrorUtils;
|
|
}
|