Closed as not planned
Description
Bug Report
π Search Terms
Array.reduce
Array.reduce doesn't work
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about reduce
β― Playground Link
Playground link with relevant code
π» Code
// We can quickly address your report if:
// - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
// - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
// - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
// - We have to pare too much extraneous code.
// - We have to clone a large repo and validate that the problem isn't elsewhere.
// - The sample is confusing or doesn't clearly demonstrate what's wrong.
π Actual behavior
TS throws error "This expression is not callable."
π Expected behavior
TS should let me iterate through array (I tell it the type is either array of IBaseOption OR array of ISelectOption (not an array of mixed types). In any case the variable is an array and those methods should be callable.