Skip to content

update type returned from emit - #3843

Closed
solomon23 wants to merge 1 commit into
socketio:masterfrom
solomon23:patch-1
Closed

solomon23 wants to merge 1 commit into
socketio:masterfrom
solomon23:patch-1

Conversation

@solomon23

Copy link
Copy Markdown
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)

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
Copy Markdown
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
```
(channel ? io.to(channel) : io).emit("stuff", message);
```

would no longer compile.

Related: #3844
@darrachequesne

Copy link
Copy Markdown
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
```
(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.

2 participants