Add internal module definition for socket.io-client

This commit is contained in:
Kensuke Matsuzaki
2014-10-15 18:11:44 +09:00
parent 8abb240eea
commit 338e5bb077
3 changed files with 19 additions and 2 deletions
+8 -1
View File
@@ -4,9 +4,16 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "socket.io-client" {
export = io;
}
export function connect(host: string, details?: any): Socket;
declare var io: SocketIOStatic;
interface SocketIOStatic {
connect(host: string, details?: any): SocketIOClient.Socket;
}
declare module SocketIOClient {
interface EventEmitter {
emit(name: string, ...data: any[]): any;
on(ns: string, fn: Function): EventEmitter;