Skip to content

Commit 02c87a8

Browse files
authored
fix(typings): ensure compatibility with TypeScript 3.x (#4259)
Labeled tuple elements were added in TypeScript 4.0. Reference: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#labeled-tuple-elements Related: 44e20ba
1 parent 37b6d8f commit 02c87a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/socket.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ export interface Handshake {
107107
auth: { [key: string]: any };
108108
}
109109

110-
export type Event = [eventName: string, ...args: any[]];
110+
/**
111+
* `[eventName, ...args]`
112+
*/
113+
export type Event = [string, ...any[]];
111114

112115
export class Socket<
113116
ListenEvents extends EventsMap = DefaultEventsMap,

0 commit comments

Comments
 (0)