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 }}
Repository navigation
[Array.prototype.reduce] TS infers accumulator type as any[] #33886
P.S. It seems reasonable to align behavior with other empty array cases, e.g.:
letx={array: []// Object literal's property 'array' implicitly has an 'any[]' type}letx=[]x[0].toLowerCase()// Variable 'x' implicitly has type 'any[]' in some locations where its type cannot be determined
Activity
RyanCavanaugh commentedon Oct 30, 2019
We should try to write a new definition of
reducethat produces the desired behavior in all cases