title: how to fix the missing type in typescript
body: <pre><code> DATA = {
      data: [
        { id: &quot;1r5WioSdYLVqp&quot;, row: 1, assetType: &quot;1r5WioSdYLVqp&quot;, status: &quot;&quot; },
        { id: &quot;w1muKlmY4lsR&quot;, row: 2, assetType: &quot;w1muKlmY4lsR&quot;, status: &quot;&quot; },
        { id: &quot;1foDN2HDHiAbT&quot;, row: 3, assetType: &quot;1foDN2HDHiAbT&quot;, status: &quot;&quot; }
      ]
    };
  
    new = { row: 1, assetType: &quot;1fKBO4w0XHg7H&quot;, status: &quot;ACTIVE&quot; }
    constructor() { }
  
    ngOnInit() {
      console.log(this.DATA);
  
      this.DATA['data'].forEach((dt, index) =&gt; {
        if (dt.row === this.new.row) {
          this.DATA['data'][index] = this.new;
        }
      });
  
      console.log(this.DATA)
    }
  </code></pre>
  <p>What I'm trying to do here is to update the data based on the row number. but on the new it has no ID. but I'm getting an error which is:
  <a href="https://i.stack.imgur.com/V1wTU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V1wTU.png" alt="enter image description here" /></a></p>