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
We would too, but there's really nothing we can do without something concrete to work with. With enough examples, maybe we could start to see a common pattern, but as an example this specific issue lacks a code sample to go with it.
Of course (as is always the case), it's in a closed-source project, and I'm not able to replicate it. Feel free to close this issue.
I think one simple thing that could help is to simply print the innermost type error. As an analogy, let's say I've built a house, and I installed the wrong type of kitchen sink in my kitchen. TypeScript seems to dump out errors in this fashion:
The house is the wrong type
The inner structure is the wrong type
Floor 1 is the wrong type
Kitchen is the wrong type
Sink is the wrong type
Of course, this is simplified quite a bit, as each step shows a lot more detail with it that tends to be overwhelming and difficult to read. It spells out the entire type, rather than pinpointing the exact problem. It would be preferable to just skip all the excess and say "sink is the wrong type". Maybe there's something useful I'm missing in the way it reports errors now, but I think legibility could still be improved somehow.
I would personally like to see TS spit out errors that are a bit more easy to decipher. In some cases,
errors can get quite ridiculous:
https://gist.github.com/ffxsam/966b71ea3c03ea95ee66c273895ac260
And I'm left scratching my head, because I can't make heads or tails of what the actual problem is.
The text was updated successfully, but these errors were encountered: