doc,http2: add parameters for Http2Session:connect event#20193
doc,http2: add parameters for Http2Session:connect event#20193ryzokuken wants to merge 1 commit intonodejs:masterfrom
Conversation
|
We don't typically list parameters like that for events, do we? I think it's useful information to have, but I'm not sure that's the best way to list it. (Maybe it is. I honestly don't know.) @nodejs/documentation |
|
@Trott we do in the http and streams documentation. For example: https://nodejs.org/dist/latest-v9.x/docs/api/http.html#http_event_connect |
I never noticed that. OK, cool. If it's what we already do elsewhere, at least it's a unified approach. |
TimothyGu
left a comment
There was a problem hiding this comment.
I don't think the "The associated ... instance" is that helpful since the same information is conveyed by the type annotation already. Otherwise, LGTM.
doc/api/http2.md
Outdated
There was a problem hiding this comment.
You can just use {Http2Session} here.
|
@TimothyGu @mcollina is this better? |
doc/api/http2.md
Outdated
There was a problem hiding this comment.
It's a bit unclear what this line means. If this is the first parameter of an event listener, we need to add a name to it, as the only unnamed types in docs are types of properties and returned values. If this is an event emitter, I do not think we formally state them in this way, as this is already inferred from the section place; this can baffle doctools.
There was a problem hiding this comment.
Umm, so should I add a name to it or skip it?
There was a problem hiding this comment.
If this is not a listener parameter, but an event source, I think we can skip it as this event is already a subsection of Http2Session section.
There was a problem hiding this comment.
It's a parameter. Code:
process.nextTick(emit, this, 'connect', this, socket);There was a problem hiding this comment.
So we need to add a name then for consistency if I am not mistaken. It seems we normally have not unnamed parameters in docs.
There was a problem hiding this comment.
naming it session, in that case.
|
This is a single documentation change, and I believe it should be fast-forwarded. Please respond with 👍 to approve fast-forwarding this. |
|
CI passed! 🎉 |
Add parameters for the callback for the Http2Session:connect event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment)
|
Squashing. |
|
Re-running CI Lite. CI Lite: https://ci.nodejs.org/job/node-test-pull-request-lite/568/ |
|
Passed again, landing. |
|
Landed in 31cbec7 |
Add parameters for the callback for the Http2Session:connect event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: #20193 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Add parameters for the callback for the Http2Session:connect event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: #20193 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Add parameters for the callback for the Http2Session:connect event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20193 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Add parameters for the callback for the Http2Session:connect event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20193 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Add parameters for the callback for the Http2Session:connect event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20193 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Add parameters for the callback for the Http2Session:connect event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) PR-URL: nodejs#20193 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Add parameters for the callback for the Http2Session:connect event inline with the pattern in the rest of the documentation. Refs: nodejs/help#877 (comment) Backport-PR-URL: #22850 PR-URL: #20193 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Add parameters for the callback for the Http2Session:connect event
inline with the pattern in the rest of the documentation.
Refs: nodejs/help#877 (comment)
Checklist
/cc @mcollina @nodejs/http2