export class ... {
single: any[] = [];
multi: any[] = [];
view: number[] = [700, 400];
... <Removed for brevity>
}
Error Message: It says 'Type 'number[]' is not assignable to type '[number, number]'
I am perplexed by this error. I declared a variable as a number array, yet when it's used in the template, this error pops up. Has anyone encountered this before?
The workaround I found was to directly use the array itself -- [view]=[700, 400] -- in the template. Quite confusing since it ought to work as expected.
Thank you.