Skip to content

Commit ab9b8e7

Browse files
vsemozhetbytTrott
authored andcommitted
doc: fix some signatures of .end() methods
In `.end()` methods, an optional `encoding` parameter makes sense only if the `data` (`chunk`) parameter is provided. PR-URL: #29615 Reviewed-By: David Carlier <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 54a0553 commit ab9b8e7

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

doc/api/http.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ deprecated: REPLACEME
11751175
11761176
See [`response.socket`][].
11771177

1178-
### response.end([data][, encoding][, callback])
1178+
### response.end([data[, encoding]][, callback])
11791179
<!-- YAML
11801180
added: v0.1.90
11811181
changes:

doc/api/http2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3006,7 +3006,7 @@ deprecated: REPLACEME
30063006

30073007
See [`response.socket`][].
30083008

3009-
#### response.end([data][, encoding][, callback])
3009+
#### response.end([data[, encoding]][, callback])
30103010
<!-- YAML
30113011
added: v8.4.0
30123012
changes:

doc/api/stream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ added: v8.0.0
394394

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

397-
##### writable.end([chunk][, encoding][, callback])
397+
##### writable.end([chunk[, encoding]][, callback])
398398
<!-- YAML
399399
added: v0.9.4
400400
changes:

0 commit comments

Comments
 (0)