Code is:
const foo = (foo: string) => {
const result = []
result.push(foo)
}
I get the following TS error:
[t
This seems to be a recent regression or some strange behavior in typescript. If you have the code:
const result = []
Usually it would be treated as if you wrote:
const result:any[] = []
however, if you have both noImplicitAny FALSE, AND strictNullChecks TRUE in your tsconfig, it is treated as:
const result:never[] = []
This behavior defies all logic, IMHO. Turning on null checks changes the entry types of an array?? And then turning on noImplicitAny actually restores the use of any without any warnings??
When you truly have an array of any, you shouldn't need to indicate it with extra code.