Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: provide examples of methods
  • Loading branch information
ronag committed Nov 24, 2019
commit fdba619c45f2863df0e14b9771cc8989215ab905
12 changes: 6 additions & 6 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1667,12 +1667,12 @@ of a stream that are intended for use by consumers (as described in the
[API for Stream Consumers][] section). Doing so may lead to adverse side effects
in application code consuming the stream.

It is highly discouraged to override any public method or to emit any internal
events such as `'error'`, `'data'`, `'end'`, `'finish'` and `'close'` manually
through `.emit(eventName)` instead of using API provided callbacks or
`.destroy(err)`. Doing so can break current and future stream invariants
leading to behavior and/or compatibility issues with other streams, stream
utilities and user expectations.
It is highly discouraged to override any public method such as `write()`,
Comment thread
ronag marked this conversation as resolved.
Outdated
`end()`, `cork()`, `uncork()`, `read()` and `destroy()`, or to emit any
Comment thread
ronag marked this conversation as resolved.
Outdated
internal event such as `'error'`, `'data'`, `'end'`, `'finish'` and `'close'`
manually through `.emit()`. Doing so can break current and future stream
Comment thread
ronag marked this conversation as resolved.
Outdated
invariants leading to behavior and/or compatibility issues with other streams,
stream utilities and user expectations.
Comment thread
ronag marked this conversation as resolved.
Outdated
Comment thread
ronag marked this conversation as resolved.
Outdated

### Simplified Construction
<!-- YAML
Expand Down