2020-10-30 20:34:04 +00:00
|
|
|
// Copyright 2020 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-09-24 21:53:21 +00:00
|
|
|
import { w3cwebsocket } from 'websocket';
|
|
|
|
|
|
|
|
type ModifiedEventSource = Omit<EventSource, 'onerror'>;
|
|
|
|
|
|
|
|
declare class ModifiedWebSocket extends w3cwebsocket
|
|
|
|
implements ModifiedEventSource {
|
|
|
|
withCredentials: boolean;
|
|
|
|
|
|
|
|
addEventListener: EventSource['addEventListener'];
|
|
|
|
|
|
|
|
removeEventListener: EventSource['removeEventListener'];
|
|
|
|
|
|
|
|
dispatchEvent: EventSource['dispatchEvent'];
|
|
|
|
}
|
|
|
|
|
|
|
|
export type WebSocket = ModifiedWebSocket;
|
|
|
|
export const WebSocket = w3cwebsocket as typeof ModifiedWebSocket;
|