Fix build due to changing socket.io types (#410)
This commit is contained in:
Родитель
e0d41f175b
Коммит
d9d1a2d6a1
|
@ -702,8 +702,8 @@
|
|||
"@types/mocha": "^2.2.32",
|
||||
"@types/mongodb": "^2.2.9",
|
||||
"@types/node": "^6.0.40",
|
||||
"@types/socket.io": "^1.4.28",
|
||||
"@types/socket.io-client": "^1.4.27",
|
||||
"@types/socket.io": "^1.4.32",
|
||||
"@types/socket.io-client": "^1.4.32",
|
||||
"@types/d3": "5.0.0",
|
||||
"antlr4ts-cli": "^0.4.0-alpha.4",
|
||||
"azure-storage": "^2.8.1",
|
||||
|
|
|
@ -41,7 +41,7 @@ function truncateQuery(query: string) {
|
|||
* sockets.
|
||||
*/
|
||||
export class GraphViewServer extends EventEmitter {
|
||||
private _server: SocketIO.Server;
|
||||
private _server: io.Server;
|
||||
private _httpServer: http.Server;
|
||||
private _port: number | undefined;
|
||||
private _socket: GraphViewServerSocket;
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as io from 'socket.io';
|
||||
|
||||
/**
|
||||
* Wraps SocketIO.Socket to provide type safety
|
||||
*/
|
||||
export class GraphViewServerSocket {
|
||||
constructor(private _socket: SocketIO.Socket) { }
|
||||
constructor(private _socket: io.Socket) { }
|
||||
|
||||
public onClientMessage(event: ClientMessage, listener: Function): void {
|
||||
this._socket.on(event, listener);
|
||||
|
|
Загрузка…
Ссылка в новой задаче