Cancel is used when you've completely finished with the stream and don't need any more data from it, even if there are chunks enqueued waiting to be read.
Optional
reason: stringA human-readable reason for the cancellation.
a Promise that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.
a Promise providing access to the next chunk in the stream's internal queue.
Generated using TypeDoc
a Promise that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.