-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: remove redundant 'Example:' and similar notes #22537
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1235,8 +1235,7 @@ type for one of its returned object properties on execution. | |
### ERR_INVALID_RETURN_VALUE | ||
|
||
Thrown in case a function option does not return an expected value | ||
type on execution. | ||
For example when a function is expected to return a promise. | ||
type on execution. For example, when a function is expected to return a promise. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know this did not originate in this PR, but the second sentence is a fragment. Optional nit: Make it a complete sentence, probably by appending it to the previous sentence and changed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
||
<a id="ERR_INVALID_SYNC_FORK_INPUT"></a> | ||
### ERR_INVALID_SYNC_FORK_INPUT | ||
|
@@ -1250,8 +1249,6 @@ for more information. | |
|
||
A Node.js API function was called with an incompatible `this` value. | ||
|
||
Example: | ||
|
||
```js | ||
const urlSearchParams = new URLSearchParams('foo=bar&baz=new'); | ||
|
||
|
@@ -1582,7 +1579,6 @@ emitted. | |
Prevents an abort if a string decoder was set on the Socket or if the decoder | ||
is in `objectMode`. | ||
|
||
Example | ||
```js | ||
const Socket = require('net').Socket; | ||
const instance = new Socket(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than continuing the sentence after the example, it would probably be better to split it into two proper sentences. Not a blocking objection, though. Just an optional nit. (Maybe instead of
Legacy code that assumes synchronous behavior, as in the following example:
could be changed toLegacy code would use syncrhronous behavior:
and line 564 can be changed toSuch legacy code would need to be changed to pass a ...
Alternative: Given that this is about a change that appeared in Node.js v0.10, I wonder if it can be removed at this time? It's only going to be relevant to people who are porting v0.8.x code and earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the first way for now.