You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
Perhaps this is the intended behavior, but from the description of the rule, the prefer-array-literal rule looks like its purpose is to disallow using Array when instantiating new arrays:
newArray();newArray(4,5);// etc...
However, this rule also disallows using Array as a type parameter, which is one of the recommended ways of declaring Array types in the handbook:
// these throw "Replace generic-typed Array with array literal" linting errorletmyArray: Array<MyObject>=[];interfaceMyInterface{myArray: Array<number>;}
I expected this rule to throw errors on the first set of examples above but allow the second set.