URL:
https://beta.docs.nodejs.org/net.html#blocklistisblocklistvalue
Browser Name:
Firefox, Chrome
Browser Version:
153.0
Operating System:
macOS 15.7.8
How to reproduce the issue:
The new return type annotations are incorrect if a function has a non-standard description of its return value. An illustrative example is BlockList.isBlockList, which incorrectly shows undefined:
A non-exhaustive list of other examples I've found:
Brian edit: converted these to list items for tracking
Presumably these are issues with the source data, which should be made consistent. But previously the documentation "got away" with it because it didn't try to show this normalised value. In the new documentation, it is probably better to err towards not showing the type in cases where it is not clear, to avoid confusion from mismatches.
Common themes are:
- constructors shown as returning
void
- async dispose methods shown as returning
void instead of Promise, as required by the interface
- functions with non-standard return text shown as returning
undefined
- occasionally functions with multiple possible return types only showing the first option
- some functions which have annotated their return type in the comments instead of in a structured way
- overloaded functions only setting a return type on the last overload
URL:
https://beta.docs.nodejs.org/net.html#blocklistisblocklistvalue
Browser Name:
Firefox, Chrome
Browser Version:
153.0
Operating System:
macOS 15.7.8
How to reproduce the issue:
The new return type annotations are incorrect if a function has a non-standard description of its return value. An illustrative example is
BlockList.isBlockList, which incorrectly showsundefined:A non-exhaustive list of other examples I've found:
voidfrom the constructorundefinedas a possible return)voidfrom the constructorvoidfrom the constructorPromise, notvoidPromisehttp.ClientRequest)http.ClientRequestbooleanstring)Brian edit: converted these to list items for tracking
Presumably these are issues with the source data, which should be made consistent. But previously the documentation "got away" with it because it didn't try to show this normalised value. In the new documentation, it is probably better to err towards not showing the type in cases where it is not clear, to avoid confusion from mismatches.
Common themes are:
voidvoidinstead ofPromise, as required by the interfaceundefined