-export const WebSocketCloseEventStatusString: Record<number, string> = Object.freeze({
+export const WebSocketCloseEventStatusString: Record<WebSocketCloseEventStatusCode, string> = Object.freeze({
1000: 'Normal Closure',
1001: 'Going Away',
1002: 'Protocol Error',
CLOSE_BAD_GATEWAY = 1014,
CLOSE_TLS_HANDSHAKE = 1015
}
+
+export interface WSError extends Error {
+ code?: string
+}