Skip to content

Conversation

@sandersn
Copy link
Member

@sandersn sandersn commented Jul 29, 2020

Previously, parameters with names that were not new were treated like rest parameters. This is incorrect: parameters with the name this should emit a this parameter.

Fixes #38550

Note that some existing type baselines were wrong, and we just never noticed.
Edit: Arguably this means I shouldn't add a new test for this fix, to keep the test suite small. Opinions?

Previously, parameters with names that were not `new` were treated like
rest parameters. This is incorrect: parameters with the name `this`
should emit a `this` parameter.

Fixes #38550
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jul 29, 2020
@sandersn sandersn changed the title Fix this parameter emit for JSDocFunction types Fix this-parameter emit for JSDocFunction types Jul 29, 2020
@sandersn sandersn merged commit 9b2d487 into master Jul 29, 2020
@sandersn sandersn deleted the fix-jsdocfunction-this-param-emit branch July 29, 2020 21:12
@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.

Declaration emit breaks with varargs and this type specified in function type parameter

4 participants