code: 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;
  }
docs: WritableStream API exposed for controllers.