Skip to content

Conversation

@dragomirtitian
Copy link
Contributor

Fixes #31845

@fatcerberus
Copy link

calledUnionsOfDissimilarTyeshaveGoodDisplay.ts

I chuckled a bit at this filename, not sure why.

@dragomirtitian
Copy link
Contributor Author

@fatcerberus It was there when I started, it amused me too 😄

@dragomirtitian
Copy link
Contributor Author

dragomirtitian commented Jul 11, 2019

@weswigham Any thought on this PR since it touches your code ? The issue was that if the methods had different parameter length combineUnionParameters would end up calling getParameterNameAtPosition with an invalid parameter index. getParameterNameAtPosition would just return the string 'unknown' in this case and since this was different from the name in the longer function it would fall back to `arg${i}`.

The fix was to use the name of the parameter in the function with more parameters.

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.

Seems like an improvement to me ❤️

@weswigham weswigham merged commit d2c9d6c into microsoft:master Jul 11, 2019
@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IntelliSense shows incorrect parameter names (TypeScript)

3 participants