Skip to content

Conversation

@sheetalkamat
Copy link
Member

Fixes #40251

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Oct 27, 2020
Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

....? This error seems.... odd. Why are we even comparing non-this parameter types (one of the signatures doesn't have any non-this parameters)?

Copy link
Member

@ahejlsberg ahejlsberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ahejlsberg
Copy link
Member

I have put up a new fix in #41308.

@sheetalkamat sheetalkamat deleted the parameterName branch October 28, 2020 18:06
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AllowJs + ES6 lib result in compiler crash

5 participants