code: function erase(ws) {
      return new Promise(function ($return, $error) {
          return Promise.resolve(unlink(ws.path)).then(function ($await_5) {
              try {
                  if (ws.writable) {
                      return Promise.resolve(endStream(ws)).then(function ($await_6) {
                          try {
                              return $If_1.call(this);
                          } catch ($boundEx) {
                              return $error($boundEx);
                          }
                      }.bind(this), $error);
                  }
  
                  function $If_1() {
                      return $return(ws);
                  }
  
                  return $If_1.call(this);
              } catch ($boundEx) {
                  return $error($boundEx);
              }
          }.bind(this), $error);
      }.bind(this));
  }
docs: Unlink a file based on its WriteStream and close the underlying stream.
  @param {Writable} ws Writable of a file
  @returns {Promise.<Writable>} Closed writable stream