removed socket interface as it's already part of es6 type definitions

This commit is contained in:
Soner Koksal
2017-11-25 19:08:27 +03:00
parent b90f90a9c6
commit 604e6a343e
2 changed files with 3 additions and 15 deletions
+3 -14
View File
@@ -9,9 +9,9 @@ export = SockJS;
export as namespace SockJS;
declare const SockJS: {
new (url: string, _reserved?: any, options?: SockJS.Options): SockJS.Socket;
(url: string, _reserved?: any, options?: SockJS.Options): SockJS.Socket;
prototype: SockJS.Socket;
new (url: string, _reserved?: any, options?: SockJS.Options): WebSocket;
(url: string, _reserved?: any, options?: SockJS.Options): WebSocket;
prototype: WebSocket;
CONNECTING: SockJS.CONNECTING;
OPEN: SockJS.OPEN;
CLOSING: SockJS.CLOSING;
@@ -49,15 +49,4 @@ declare namespace SockJS {
sessionId?: number | SessionGenerator;
transports?: string | string[];
}
interface Socket extends EventTarget {
readyState: State;
protocol: string;
url: string;
onopen(e: OpenEvent): any;
onclose(e: CloseEvent): any;
onmessage(e: MessageEvent): any;
send(data: any): void;
close(code?: number, reason?: string): void;
}
}
@@ -43,5 +43,4 @@ sockJs.close(100, 'reason');
sockJs.close(200);
sockJs.close();
type MySocket = SockJS.Socket;
type MessageEvent = SockJS.MessageEvent;