code: function AstroturfLoaderError(error) {
    Error.call(this);
    this.name = 'AstroturfLoaderError';
  
    this.message = error.message;
    if (error.codeFrame) this.message += `\n\n ${error.codeFrame} \n`;
  
    this.error = error;
    try {
      this.stack = error.stack.replace(/^(.*?):/, `${this.name}:`);
    } catch (err) {
      Error.captureStackTrace(this, AstroturfLoaderError);
    }
  }
docs: can'ts use class syntax b/c babel doesn't transpile it correctly for Error