Potential regression in 4.2 - Calling `.map` on `T[] | Y[]` is now callable but leads to an implicit any error
See original GitHub issueBug Report
🔎 Search Terms
expression not callable union arrays
🕗 Version & Regression Information
This changed between versions 4.1.3 and 4.2 beta
⏯ Playground Link
💻 Code
declare const x: number[] | string[]
x.map(f => f)
🙁 Actual behavior
.map
is now callable but f
as an implicit type of any
, leading to an implicit any error.
🙂 Expected behavior
The current behaviour in 4.1.3 is to mark the map()
call as not callable as well as f
should have an implicit any type.
I don’t know if this is a regression but I’m raising it because this change in behaviour is not documented in the release notes.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
'this' implicitly has type 'any' because it does not have a type ...
json , I get this error for the following code: 'this' implicitly has type 'any' because it does not have a type annotation....
Read more >Chapter 7: Correlation and Simple Linear Regression
A correlation exists between two variables when one of them is related to the other in some way. A scatterplot is the best...
Read more >Applied linear statistical models.djvu - University of Florida
Regression analysis. 2. Mathematical statistics. I. Kutner, Michael H. Applied linear regression models. II. Title. III. Series. QA278.2.K87 2005.
Read more >Multicollinearity in Regression Analysis: Problems, Detection ...
Multicollinearity is when independent variables in a regression model are correlated. I explore its problems, testing your model for it, and solutions.
Read more >Practical Regression and Anova using R
A basic knowledge of data analysis is presumed. Some linear algebra and calculus is also required. The emphasis of this text is on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
every
andfilter
have multiple overloads (with differing numbers of type parameters) which makes the union call difficult to resolve, whilemap
only has one overload, so combining the signatures is much more straightforward.An isolated real-world case to demo how this issue is a pain: playground
every
causes the following error: