UNPKG

theater-client

Version:

TypeScript client library for Theater actor system TCP protocol

37 lines 1.04 kB
/** * Client-specific types for the Theater client library */ // Error types export class TheaterError extends Error { code; details; constructor(message, code, details) { super(message); this.code = code; this.details = details; this.name = 'TheaterError'; } } export class TheaterConnectionError extends TheaterError { cause; constructor(message, cause) { super(message, 'CONNECTION_ERROR'); this.cause = cause; this.name = 'TheaterConnectionError'; } } export class TheaterTimeoutError extends TheaterError { constructor(operation, timeout) { super(`Operation '${operation}' timed out after ${timeout}ms`, 'TIMEOUT'); this.name = 'TheaterTimeoutError'; } } export class TheaterProtocolError extends TheaterError { details; constructor(message, details) { super(message, 'PROTOCOL_ERROR', details); this.details = details; this.name = 'TheaterProtocolError'; } } //# sourceMappingURL=client.js.map