diff --git a/packages/js-runtime/src/runtime/global/webscoket.ts b/packages/js-runtime/src/runtime/global/webscoket.ts index 9587f069d..5c7c4d188 100644 --- a/packages/js-runtime/src/runtime/global/webscoket.ts +++ b/packages/js-runtime/src/runtime/global/webscoket.ts @@ -101,7 +101,7 @@ }) .catch(err => { this._readyState = WsState.CLOSED; - + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const errorEv = new Event('error', { error: err, message: err.toString() }); this.dispatchEvent(errorEv); @@ -127,6 +127,7 @@ LagonAsync.websocketClose(this.wsId, code, reason).catch(err => { const errorEv = new Event('error', { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore error: err, message: err.toString(), @@ -165,6 +166,7 @@ } const event = new Event('close', { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore wasClean: true, }); @@ -175,6 +177,7 @@ this.serverHandleIdleTimeout(); const event = new Event('message', { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore data, origin: this._url, @@ -184,8 +187,8 @@ } catch (e: any) { this._readyState = WsState.CLOSED; - // @ts-ignore const errorEv = new Event('error', { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore message: e, }); @@ -213,12 +216,14 @@ this._readyState = WsState.CLOSED; const errEvent = new Event('error', { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore message: reason, }); this.dispatchEvent(errEvent); const event = new Event('close', { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore wasClean: false, code: 1001,