File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const dotMapRegex = /\.map/;
2525type Transport = "polling" | "websocket" ;
2626type ParentNspNameMatchFn = (
2727 name : string ,
28- query : object ,
28+ auth : { [ key : string ] : any } ,
2929 fn : ( err : Error | null , success : boolean ) => void
3030) => void ;
3131
@@ -246,7 +246,7 @@ export class Server extends EventEmitter {
246246 */
247247 _checkNamespace (
248248 name : string ,
249- auth : object ,
249+ auth : { [ key : string ] : any } ,
250250 fn : ( nsp : Namespace | false ) => void
251251 ) : void {
252252 if ( this . parentNsps . size === 0 ) return fn ( false ) ;
Original file line number Diff line number Diff line change @@ -5,14 +5,15 @@ import debugModule from "debug";
55import type { Server } from "./index" ;
66import type { Client } from "./client" ;
77import type { Namespace } from "./namespace" ;
8- import type { IncomingMessage } from "http" ;
8+ import type { IncomingMessage , IncomingHttpHeaders } from "http" ;
99import type {
1010 Adapter ,
1111 BroadcastFlags ,
1212 Room ,
1313 SocketId ,
1414} from "socket.io-adapter" ;
1515import base64id from "base64id" ;
16+ import type { ParsedUrlQuery } from "querystring" ;
1617
1718const debug = debugModule ( "socket.io:socket" ) ;
1819
@@ -33,7 +34,7 @@ export interface Handshake {
3334 /**
3435 * The headers sent as part of the handshake
3536 */
36- headers : object ;
37+ headers : IncomingHttpHeaders ;
3738
3839 /**
3940 * The date of creation (as string)
@@ -68,12 +69,12 @@ export interface Handshake {
6869 /**
6970 * The query object
7071 */
71- query : object ;
72+ query : ParsedUrlQuery ;
7273
7374 /**
7475 * The auth object
7576 */
76- auth : object ;
77+ auth : { [ key : string ] : any } ;
7778}
7879
7980export class Socket extends EventEmitter {
You can’t perform that action at this time.
0 commit comments