title: How to export a prototype method?
body: <p>How to export a prototype method?</p>
  <p>I created a prototype method:</p>
  <pre><code>Array.prototype.remove = function(elementToRemove: any): void {
      var __idx = this.indexOf(elementToRemove);
      if (__idx &gt;= 0) {
          this.splice(__idx, 1);
      } else {
          throw new Error(`Cannot find element ${elementToRemove}`)
      }
  }
  </code></pre>
  <p>and I want to export it and use in another file. But I don't know how to add export to it:</p>
  <p>both</p>
  <pre><code>export Array.prototype.remove = function(elementToRemove: any)
  </code></pre>
  <p>and</p>
  <pre><code>Array.prototype.remove = export function(elementToRemove: any)
  </code></pre>
  <p>doesn't work, I received 'Expression expected' Error. So how can I export it?</p>
  <p>ps: I'm not using nodejs, I'm using web frontend in chrome with HTML and CSS.</p>