JS: add docstring with source examples

This commit is contained in:
Esben Sparre Andreasen
2021-01-21 20:46:34 +01:00
parent 1c100bbbc2
commit cb25f2ab20

View File

@@ -1063,6 +1063,18 @@ module NodeJSLib {
}
}
/**
* An HTTP request event handler parameter as an EventEmitter, for
* example the function `emitter` in either of the following:
*
* ```
* http.request(x, emitter => {...})
* ```
*
* ```
* http.request(...).on(y, emitter => { ...})
* ```
*/
private class ClientRequestEventEmitter extends NodeJSEventEmitter {
ClientRequestEventEmitter() {
exists(ClientRequestHandler handler |