-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix: off() takes a single function, not array * Fix and lock typescript typings The previous attempt to manually sync missed some details, then remove the outdated @types/socket-io and use the built-in types instead. Then do a mapping of the original IoSocket type to the wrapped, forcing the wrapper to be returned for chained, properties should alway match. This will force the wrapper to be in sync without much effort. * Breaking: mark internal fields as private, all as readonly None of these fields should be reassigned once they are created, so they are all readonly. Except by ioSocket, all are of internal use, so keep them private. * Breaking: fix off() behavior, sync with socket-io-client off() without an event name just unregisters all event handlers via EventEmitter. The comment implied offAny() would do this, but it's not the case: that just removes the onAny() handlers. If we really wanted to remove all event handlers for everything we should be calling: - offAny() - offAnyOutgoing() - off() But that would not match the wrapped behavior, so let's just keep it simple.
- Loading branch information
Showing
3 changed files
with
124 additions
and
61 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters