-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Fix 10438 - Remove parameters of private methods and constructors in declaration files #11030
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
Conversation
Hi @Igorbek, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
@Igorbek, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
Is it going to be reviewed/merged? |
@@ -1352,6 +1360,15 @@ namespace ts { | |||
// If we are emitting Method/Constructor it isn't moduleElement and hence already determined to be emitting | |||
// so no need to verify if the declaration is visible | |||
if (!resolver.isImplementationOfOverload(node)) { | |||
// If we are emitting a private method or constructor it might be already emitted with an overloaded signature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems incorrect way of handling it.
You could just check in emitSignatureDeclaration
if this is first signature and skip rest for private methods.
Map of name is not needed and if needed you can ask resolver for the question instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I'll change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, writeFunctionDeclaration
first writes declaration flags and function name and then calls emitSignatureDeclaration
. So it seems here's the proper place for checking.
Do you suggest to add a new question to resolver? Because I didn't find any that matches that need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need change in approach with method declaration emit
Thanks for your contribution. This PR has failing CI tests and can not be merged in at the time being. For housekeeping purposes we are closing stale PRs. If you'd still like to merge this code in, please open a new PR that has been merged and rebased with the |
Fixes #10438
This PR makes these changes in declaration emitting:
private methodName;
private static methodName;
private constructor();
Open questions:
#myfirsttypescriptpr