Skip to content

Commit fdba619

Browse files
committed
fixup: provide examples of methods
1 parent fc5029d commit fdba619

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/api/stream.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,12 +1667,12 @@ of a stream that are intended for use by consumers (as described in the
16671667
[API for Stream Consumers][] section). Doing so may lead to adverse side effects
16681668
in application code consuming the stream.
16691669

1670-
It is highly discouraged to override any public method or to emit any internal
1671-
events such as `'error'`, `'data'`, `'end'`, `'finish'` and `'close'` manually
1672-
through `.emit(eventName)` instead of using API provided callbacks or
1673-
`.destroy(err)`. Doing so can break current and future stream invariants
1674-
leading to behavior and/or compatibility issues with other streams, stream
1675-
utilities and user expectations.
1670+
It is highly discouraged to override any public method such as `write()`,
1671+
`end()`, `cork()`, `uncork()`, `read()` and `destroy()`, or to emit any
1672+
internal event such as `'error'`, `'data'`, `'end'`, `'finish'` and `'close'`
1673+
manually through `.emit()`. Doing so can break current and future stream
1674+
invariants leading to behavior and/or compatibility issues with other streams,
1675+
stream utilities and user expectations.
16761676

16771677
### Simplified Construction
16781678
<!-- YAML

0 commit comments

Comments
 (0)