Skip to content

Commit

Permalink
fix(typings): ensure compatibility with TypeScript 3.x (#4259)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
delucis authored Jan 25, 2022
1 parent 37b6d8f commit 02c87a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 107,10 @@ export interface Handshake {
auth: { [key: string]: any };
}

export type Event = [eventName: string, ...args: any[]];
/**
* `[eventName, ...args]`
*/
export type Event = [string, ...any[]];

export class Socket<
ListenEvents extends EventsMap = DefaultEventsMap,
Expand Down

0 comments on commit 02c87a8

Please sign in to comment.