// FIXME: Deprecate this, it does not work as-expected when the onResult callback never gets called (eg. due to a stream immediately terminating), as the onResult callback will then never get a chance to set the lastResult, not even to an initializer value (eg. an empty array for `collect`)
// We return whatever value we got last from the specified onResult callback.
returnlastResult;
})]
@ -30,8 +32,10 @@ module.exports = function simpleSinkStream(_options) {
letonEndCalled=false;
letonEndResult;
letabortHandled=false;
letlastKnownSource;
return{
_promistreamVersion:0,
description:`simple sink stream`,
abort:propagateAbort,
peek:propagatePeek,
@ -50,9 +54,15 @@ module.exports = function simpleSinkStream(_options) {