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/;
25
25
type Transport = "polling" | "websocket" ;
26
26
type ParentNspNameMatchFn = (
27
27
name : string ,
28
- query : object ,
28
+ auth : { [ key : string ] : any } ,
29
29
fn : ( err : Error | null , success : boolean ) => void
30
30
) => void ;
31
31
@@ -246,7 +246,7 @@ export class Server extends EventEmitter {
246
246
*/
247
247
_checkNamespace (
248
248
name : string ,
249
- auth : object ,
249
+ auth : { [ key : string ] : any } ,
250
250
fn : ( nsp : Namespace | false ) => void
251
251
) : void {
252
252
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";
5
5
import type { Server } from "./index" ;
6
6
import type { Client } from "./client" ;
7
7
import type { Namespace } from "./namespace" ;
8
- import type { IncomingMessage } from "http" ;
8
+ import type { IncomingMessage , IncomingHttpHeaders } from "http" ;
9
9
import type {
10
10
Adapter ,
11
11
BroadcastFlags ,
12
12
Room ,
13
13
SocketId ,
14
14
} from "socket.io-adapter" ;
15
15
import base64id from "base64id" ;
16
+ import type { ParsedUrlQuery } from "querystring" ;
16
17
17
18
const debug = debugModule ( "socket.io:socket" ) ;
18
19
@@ -33,7 +34,7 @@ export interface Handshake {
33
34
/**
34
35
* The headers sent as part of the handshake
35
36
*/
36
- headers : object ;
37
+ headers : IncomingHttpHeaders ;
37
38
38
39
/**
39
40
* The date of creation (as string)
@@ -68,12 +69,12 @@ export interface Handshake {
68
69
/**
69
70
* The query object
70
71
*/
71
- query : object ;
72
+ query : ParsedUrlQuery ;
72
73
73
74
/**
74
75
* The auth object
75
76
*/
76
- auth : object ;
77
+ auth : { [ key : string ] : any } ;
77
78
}
78
79
79
80
export class Socket extends EventEmitter {
You can’t perform that action at this time.
0 commit comments