Type 'any[]' is not assignable to type '[]'. Target allows only 0 element(s) but source may have more. code example Example: string is not assignable to type never const result : string[] = [];