-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
Docs on http.Server.listen() need clarifications on accepted args #16300
Copy link
Copy link
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
This is in relation to facebook/flow#1684
While Flow typing a module that uses
http.Server.listen(), I received an error for the idiomatic form widely used in Node projects:Flow declares the types of
http.Server.listen()like this:which adheres to the documentation of the
httpmodule.Since the
netmodule normalizes the arguments and Node itself uses the shorthand forms in the docs on the same page (Event: 'connect', Event: 'upgrade'), I suggest to amend the documentation explaining the shorthand forms are both supported:Thoughts?