Skip to content

Commit

Permalink
doc: fix some signatures of .end() methods
Browse files Browse the repository at this point in the history
In `.end()` methods, an optional `encoding` parameter makes sense
only if the `data` (`chunk`) parameter is provided.

PR-URL: #29615
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
vsemozhetbyt authored and BridgeAR committed Sep 25, 2019
1 parent 5c24bc6 commit edaa2ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ added: v0.3.0

See [`response.socket`][].

### response.end([data][, encoding][, callback])
### response.end([data[, encoding]][, callback])
<!-- YAML
added: v0.1.90
changes:
Expand Down
2 changes: 1 addition & 1 deletion doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3016,7 +3016,7 @@ added: v8.4.0

See [`response.socket`][].

#### response.end([data][, encoding][, callback])
#### response.end([data[, encoding]][, callback])
<!-- YAML
added: v8.4.0
changes:
Expand Down
2 changes: 1 addition & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ added: v8.0.0

Is `true` after [`writable.destroy()`][writable-destroy] has been called.

##### writable.end([chunk][, encoding][, callback])
##### writable.end([chunk[, encoding]][, callback])
<!-- YAML
added: v0.9.4
changes:
Expand Down

0 comments on commit edaa2ee

Please sign in to comment.