Uh oh!
There was an error while loading. Please reload this page.
Handle when associated name can be undefined - #41285
Handle when associated name can be undefined#41285Sheetal Nandi (sheetalkamat) wants to merge 1 commit into
Conversation
Wesley Wigham (weswigham)
left a comment
There was a problem hiding this comment.
associatedNames being present-but-empty/differing-in-length-from-the-types seems like a smell that should be fixed elsewhere, but I'll accept this as a fix.
| ~~~~~~~~ | ||
| !!! error TS2684: The 'this' context of type '<T>(...items: T[]) => T[]' is not assignable to method's 'this' of type '(this: () => void) => unknown[]'. | ||
| !!! error TS2684: Types of parameters 'items' and 'args_0' are incompatible. | ||
| !!! error TS2684: Type 'any' is not assignable to type 'never'. |
There was a problem hiding this comment.
....? This error seems.... odd. Why are we even comparing non-this parameter types (one of the signatures doesn't have any non-this parameters)?
Anders Hejlsberg (ahejlsberg)
left a comment
There was a problem hiding this comment.
I don't think this is the right fix. The issue here is that we're asking for a parameter name with an out of bounds index, which shouldn't happen. The real fix is to make sure it doesn't. I will add more info in the original issue and put up a new PR.
Anders Hejlsberg (ahejlsberg)
commented
Oct 28, 2020
I have put up a new fix in #41308. |
Fixes#40251