Visual Studio Code – I am new to angular and I don't know how to resolve TS(2322) error?
Main Code: export class TodosComponent implements OnInit{ todos!: Todo[]; localItem: string; constructor(){ const item = localStorage.getItem("todos"); this.localItem = item; if(this.localItem == null){ this.todos = []; } else{ console.log(this.todos); this.todos = JSON.parse("localItem"); } } This is what I got after compilation…