Node: Documentation is not clear enough regarding parameters in callback

Created on 18 Dec 2019  路  3Comments  路  Source: nodejs/node

https://nodejs.org/docs/latest-v12.x/api/net.html#net_server_listen_options_callback

It states: callback <Function> Common parameter of server.listen() functions.

This does not give me any information if there are or if there are no any parameters when the function is called.

doc net

Most helpful comment

I'd be inclined to simply remove Common parameter of server.listen() functions. That text just muddies things. It's a callback. It's named callback. Its type is function. That by itself is pretty clear. Everything else can be in the text and examples.

All 3 comments

Yeap, it's quite unclear.

You think this could be better with a code example? Or what do you suggest for this?

I'd be inclined to simply remove Common parameter of server.listen() functions. That text just muddies things. It's a callback. It's named callback. Its type is function. That by itself is pretty clear. Everything else can be in the text and examples.

I would like to work on this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ksushilmaurya picture ksushilmaurya  路  3Comments

srl295 picture srl295  路  3Comments

Icemic picture Icemic  路  3Comments

vsemozhetbyt picture vsemozhetbyt  路  3Comments

akdor1154 picture akdor1154  路  3Comments