icom-wlan-node
Version:
Icom WLAN (CI‑V, audio) protocol implementation for Node.js/TypeScript.
34 lines (33 loc) • 1.2 kB
TypeScript
import { DisconnectReason, ConnectionPhase } from '../types';
/**
* Get human-readable message for a disconnect reason
*/
export declare function getDisconnectMessage(reason: DisconnectReason): string;
/**
* Error thrown when a connection attempt is aborted
* This is typically used when disconnect() is called during connect()
*/
export declare class ConnectionAbortedError extends Error {
readonly reason: DisconnectReason;
readonly sessionId: number;
readonly phase: ConnectionPhase;
readonly context?: Record<string, any> | undefined;
readonly name = "ConnectionAbortedError";
constructor(reason: DisconnectReason, sessionId: number, phase: ConnectionPhase, context?: Record<string, any> | undefined);
/**
* Check if this error should be silent (not thrown to user)
* Cleanup and timeout errors during connect are typically expected
*/
isSilent(): boolean;
/**
* Get detailed error information for debugging
*/
toJSON(): {
name: string;
message: string;
reason: DisconnectReason;
sessionId: number;
phase: ConnectionPhase;
context: Record<string, any> | undefined;
};
}