I've been working on flattening an array, but unfortunately I keep encountering an error - TS2769: No overload matches this call.
Oddly enough, when I tested this in stackblitz, it worked perfectly.
The issue seems to be related to the spread operator: ...this.selectedInstitutions
selectedInstitutions = [
[{ displayValue: 'ABC', id: 781 }],
[{ displayValue: 'DEF', id: 782 }],
];
ngOnInit() {
this.selectedInstitutions = [].concat(...this.selectedInstitutions);
}
This is the exact error message I'm receiving: