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 Trott committed Sep 22, 2019
1 parent 54a0553 commit ab9b8e7
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 @@ -1175,7 +1175,7 @@ deprecated: REPLACEME
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 @@ -3006,7 +3006,7 @@ deprecated: REPLACEME

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 @@ -394,7 +394,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 ab9b8e7

Please sign in to comment.