Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typings): ensure compatibility with TypeScript 3.x #4259

Merged
merged 1 commit into from
Jan 25, 2022
Merged

fix(typings): ensure compatibility with TypeScript 3.x #4259

merged 1 commit into from
Jan 25, 2022

Conversation

delucis
Copy link
Contributor

@delucis delucis commented Jan 23, 2022

The kind of change this PR does introduce

  • a bug fix

Current behavior

#4138 added an Event type using Typescript’s labelled tuple syntax:

type Event = [eventName: string, ...args: any[]];

This fails to compile if a consumer is using a TypeScript version less than 4.x

Reference: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#labeled-tuple-elements

New behavior

This PR removes the labelling in the Event type to continue to support TypeScript 3.x as did 0cb6ac9.

@darrachequesne darrachequesne merged commit 02c87a8 into socketio:master Jan 25, 2022
@darrachequesne
Copy link
Member

@delucis thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants