7b6d8f55d6
Co-authored-by: Chris Svenningsen <chris@carbonfive.com>
17 lines
492 B
TypeScript
17 lines
492 B
TypeScript
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;
|