Skip to content
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

fix: Prevent @hidden signature from removing method declaration #1169

Merged
merged 1 commit into from
Jan 14, 2020

Conversation

socsieng
Copy link
Contributor

For #1142

The declaration was being treat as hidden when applyModifiers was being called. This change determines if the reflection is hidden during resolution instead.

Comment on lines +121 to +125
{
"fileName": "comment.ts",
"line": 70,
"character": 13
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find a way to remove sources from signatures that have been removed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is OK, but will see if I notice an easy way to do it

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 14, 2020

Removing reflections during resolution poses a problem - if a reference is later created pointing to that reflection it will be reported as as a broken reference.

This is part of the problem posed in #1166. When the reflection is removed determines whether or not you get a broken reference.

@socsieng
Copy link
Contributor Author

Removing reflections during resolution poses a problem

This is consistent with existing behavior. Isn't the resolution process the right time to remove reflections?

if a reference is later created pointing to that reflection it will be reported as as a broken reference

Creating reflections after/during the resolution process seems like the wrong time to be doing this.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 14, 2020

Sorry, just looking at the diff misled me, I thought they were being removed in the onDeclaration method. Yes you are correct, that's the right time to do this. Let me pull it down and play with it locally and it should be good to merge 👍

@Gerrit0 Gerrit0 merged commit 99d738f into TypeStrong:master Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants