error TS2349: Cannot invoke an expression whose type lacks a call signature error TS2349: Cannot invoke an expression whose type lacks a call signature angular angular

error TS2349: Cannot invoke an expression whose type lacks a call signature


Changing

let labels: string[] | number[] = [];

to either of these

let labels: (string | number)[] = [];let labels: Array<number|string> = [];

will solve the issue.