title: How do I add the capability to push onto a getter that returns a filtered array?
body: <p>I have class that has a private array and a getter that returns a filtered version of said array. I would like to be able to simply call a push onto the filtered array which would update the underlying array without having to directly call the underlying array. I've tried accessing the array prototype but couldn't quite figure out how to do so. </p>
  
  <p>Here's a code snippet to emulate what I'm trying to do:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>class Test {
   _foo: number[];
    
    constructor() {
     this._foo = [1,2,3,4,5];
    }
    
    get foo(): number[] {
     return this._foo.filter(x =&gt; {
       return x &gt; 2;
      });
    }
  }
  
  let obj = new Test();
  obj.foo.push(6);
  
  console.log(obj);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any advice is appreciated.</p>