mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #4228 from elisee/patch-2
socket.io: Add "in" method to SocketIO.Namespace, "handshake" property to SocketIO.Socket
This commit is contained in:
Vendored
+12
@@ -46,6 +46,7 @@ declare module SocketIO {
|
||||
name: string;
|
||||
connected: { [id: string]: Socket };
|
||||
use(fn: Function): Namespace;
|
||||
in(room: string): Namespace;
|
||||
|
||||
on(event: 'connection', listener: (socket: Socket) => void): Namespace;
|
||||
on(event: 'connect', listener: (socket: Socket) => void): Namespace;
|
||||
@@ -58,6 +59,17 @@ declare module SocketIO {
|
||||
conn: any;
|
||||
request: any;
|
||||
id: string;
|
||||
handshake: {
|
||||
headers: any;
|
||||
time: string;
|
||||
address: any;
|
||||
xdomain: boolean;
|
||||
secure: boolean;
|
||||
issued: number;
|
||||
url: string;
|
||||
query: any;
|
||||
};
|
||||
|
||||
emit(name: string, ...args: any[]): Socket;
|
||||
join(name: string, fn?: Function): Socket;
|
||||
leave(name: string, fn?: Function): Socket;
|
||||
|
||||
Reference in New Issue
Block a user