Closed
Description
Bug Report
π Search Terms
- any type used in array initialization
π Version & Regression Information
3.9.7 and beyond
β― Playground Link
π» Code
const somenumber: number = 1;
const somethingelse: any = 1;
const c: string[] = [somenumber, somethingelse];
π Actual behavior
No errors reported.
π Expected behavior
Error reported on the array initialization, on line 3, on the use of somenumber
in a string array .
Side note
If this is expected behavior when any item is any, is there a way to have the typescript lint report this?
It seems odd that the initialization line reports no error or warning at all, since there's a specific type declared on that line.
Metadata
Metadata
Assignees
Labels
No labels