From 7ce445303706a79b58a0c7677ae9577ca0f0f4fa Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Wed, 9 Oct 2019 08:45:00 +0200 Subject: [PATCH] doc: add notes about non-confirming streams --- doc/api/stream.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/api/stream.md b/doc/api/stream.md index ca62df8169cf71..c71372e96cc047 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1667,6 +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. As well as emitting +`'error'` events manually through `.emit(err)` instead of using API provided +callbacks or `.destroy(err)`. Doing so can break current and future stream +invariants leading to behaviour and/or compatibility issues with other streams, +stream utilities and user expectations. + ### Simplified Construction