Skip to content

update type returned from emit #3843

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

Closed
wants to merge 1 commit into from
Closed

Conversation

solomon23
Copy link
Contributor

Using a true here breaks using union types to do emits.. ie this no longer works
(channel ? io.to(channel) : io).emit("stuff", message);

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behavior

New behavior

Other information (e.g. related issues)

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
IvanGoncharov Ivan Goncharov
Using a `true` here breaks using union types to do emits.. ie this no longer works
`(channel ? io.to(channel) : io).emit("stuff", message);`
@solomon23
Copy link
Contributor Author

maybe someone can run with this - i don't know why the unit tests are failing but you shouldn't use true as a type

darrachequesne pushed a commit that referenced this pull request Mar 18, 2021

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
```
(channel ? io.to(channel) : io).emit("stuff", message);
```

would no longer compile.

Related: #3844
@darrachequesne
Copy link
Member

Merged as 1a72ae4. Thanks a lot! 👍

@darrachequesne darrachequesne added this to the 4.0.1 milestone Mar 31, 2021
dzad pushed a commit to dzad/socket.io that referenced this pull request May 29, 2023

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
```
(channel ? io.to(channel) : io).emit("stuff", message);
```

would no longer compile.

Related: socketio#3844
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.

None yet

2 participants