A Subject is a combination of a :class and a :class giving the developer the ability to both queue items and fork the stream from the same object.
const subject = new Subject<number>()subject.enqueue(1)subject.enqueue(2)subject.enqueue(3)subject.fork().pipeTo(write(chunk => console.info(chunk))) Copy
const subject = new Subject<number>()subject.enqueue(1)subject.enqueue(2)subject.enqueue(3)subject.fork().pipeTo(write(chunk => console.info(chunk)))
Optional
Generated using TypeDoc
A Subject is a combination of a :class and a :class giving the developer the ability to both queue items and fork the stream from the same object.
Example