diff --git a/doc/api/stream.md b/doc/api/stream.md index ca62df8169cf71..800a4ccb17674e 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1667,6 +1667,13 @@ 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. +Avoid overriding public methods such as `write()`, `end()`, `cork()`, +`uncork()`, `read()` and `destroy()`, or emitting internal events such +as `'error'`, `'data'`, `'end'`, `'finish'` and `'close'` through `.emit()`. +Doing so can break current and future stream invariants leading to behavior +and/or compatibility issues with other streams, stream utilities, and user +expectations. + ### Simplified Construction