packages/mesh/lib/streams/std/writable-stream.js
function WritableStreamAddWriteRequest(stream) {
  assert(IsWritableStreamLocked(stream) === true);
  assert(stream._state === 'writable');

  const promise = new Promise((resolve, reject) => {
    const writeRequest = {
      _resolve: resolve,
      _reject: reject
    };

    stream._writeRequests.push(writeRequest);
  });

  return promise;
}
function WritableStreamAddWriteRequest(stream) {
  assert(IsWritableStreamLocked(stream) === true);
  assert(stream._state === 'writable');

  const promise = new Promise((resolve, reject) => {
    const writeRequest = {
      _resolve: resolve,
      _reject: reject
    };

    stream._writeRequests.push(writeRequest);
  });

  return promise;
}
function WritableStreamAddWriteRequest ( stream ) { assert ( IsWritableStreamLocked ( stream ) === true ) ; assert ( stream . _state === 'writable' ) ; const promise = new Promise ( ( resolve , reject ) => { const writeRequest = { _resolve : resolve , _reject : reject } ; stream . _writeRequests . push ( writeRequest ) ; } ) ; return promise ; }
WritableStream API exposed for controllers.
WritableStream API exposed for controllers .