[@types/ws] Remove dependency on node >= 10#26196
Merged
armanio123 merged 1 commit intoDefinitelyTyped:masterfrom Jun 6, 2018
austinried:master
Merged
[@types/ws] Remove dependency on node >= 10#26196armanio123 merged 1 commit intoDefinitelyTyped:masterfrom austinried:master
armanio123 merged 1 commit intoDefinitelyTyped:masterfrom
austinried:master
Conversation
9 tasks
Contributor
|
@austinried Thank you for submitting this PR! 🔔 @loyd @elithrar @mlamp @TitaneBoy @orblazer - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
Contributor
|
A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped! |
orblazer
approved these changes
Jun 6, 2018
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes a dependency on
net.AddressInfo, which is only present in@types/node@10and creates a dependency that is not needed. Version 5.x ofwsrequires node 4.5+ and should not have this dependency: https://github.com/websockets/ws/releases/tag/5.0.0The error you receive when using types for node versions below 10 is:
Two related issues exist: #25890 (closed) and #26195 (open). The appropriate interface for the return type of the
server.address()function is in fact the same asnet.AddressInfo | string(docs here: https://github.com/websockets/ws/blob/master/doc/ws.md#serveraddress) so I have extracted the interface and included it in this definition to remove the dependency on node >= 10 types.npm test.)npm run lint package-name(ortscif notslint.jsonis present).If changing an existing definition: