Skip to content

Fix this-parameter emit for JSDocFunction types #39814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 29, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
3 participants