@eventmsg/core
Version:
EventMsgV3 TypeScript library - Core protocol implementation with transport abstraction
50 lines (48 loc) • 1.37 kB
TypeScript
import { EventMsgError } from "./event-msg-error.js";
//#region src/errors/timeout-error.d.ts
/**
* Error for operations that exceed their timeout duration
*/
declare class TimeoutError extends EventMsgError {
/** Timeout duration in milliseconds */
readonly timeoutMs: number;
/** Operation that timed out */
readonly operation: string;
constructor(message: string, timeoutMs: number, operation?: string, options?: {
context?: Record<string, unknown>;
solutions?: string[];
cause?: Error;
});
}
/**
* Send operation timed out
*/
declare class SendTimeoutError extends TimeoutError {
constructor(timeoutMs: number, options?: {
context?: Record<string, unknown>;
cause?: Error;
});
}
/**
* WaitFor operation timed out
*/
declare class WaitForTimeoutError extends TimeoutError {
/** Event name that was being waited for */
readonly eventName: string;
constructor(eventName: string, timeoutMs: number, options?: {
context?: Record<string, unknown>;
cause?: Error;
});
}
/**
* Connection timeout error
*/
declare class ConnectionTimeoutError extends TimeoutError {
constructor(timeoutMs: number, options?: {
context?: Record<string, unknown>;
cause?: Error;
});
}
//#endregion
export { ConnectionTimeoutError, SendTimeoutError, TimeoutError, WaitForTimeoutError };
//# sourceMappingURL=timeout-error.d.ts.map