title: Prototype function undefined NodeTS
body: <p>I am trying to add a prototype function on Array and have declared in a .d.ts file in my Node project as below but am still getting &quot;paginate is not a function&quot; but VSCode is not returning any errors when I try to access this method on an array variable.</p>
  <pre><code>declare global {
      interface Array&lt;T&gt; {
          paginate(filters: Object): Array&lt;T&gt;;
      }
  }
  
  Array.prototype.paginate = function(f): Array {
      console.log(&quot;PAGINATE !!&quot;);
      return this;
  }
  
  export {};
  </code></pre>
  <p>I want to be able to access this &quot;paginate&quot; method in my whole project globally without importing it in every single file</p>