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
TypeScript raises an error when using the first .find, saying "This expression is not callable. Each member of the union type has signatures, but none of those signatures are compatible with each other."
🙂 Expected behavior
I would expect the .find method to properly work on the items list, even with an union type, like the two other functions work with no error.
There seems to be an issue with type unions that I can't understand.
The text was updated successfully, but these errors were encountered:
Bug Report
🔎 Search Terms
Generic union type, recursivity in unions, generic union with arrays, TS 2349
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
TypeScript raises an error when using the first
.find
, saying "This expression is not callable. Each member of the union type has signatures, but none of those signatures are compatible with each other."🙂 Expected behavior
I would expect the
.find
method to properly work on the items list, even with an union type, like the two other functions work with no error.There seems to be an issue with type unions that I can't understand.
The text was updated successfully, but these errors were encountered: