Skip to content

Report errors for usage of private types when generating declaration file #161

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 6 commits into from
Aug 6, 2014

Conversation

sheetalkamat
Copy link
Member

Currently this change reports errors only for heritage clause and constraints of type parameters if the name is not public

}
private static myPrivateStaticMethod<T extends privateClass>() {
~~~~~~~~~~~~~~~~~~~~~~
!!! TypeParameter 'T' of public static method from exported class has or is using private name 'privateClass'.
Copy link
Member

Choose a reason for hiding this comment

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

Error message is wrong here -- the method is not public. Related: logged #163

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed this. thanks for finding this

…ype parameter constraint of private methods

Also incorporates code review feedback
@@ -645,7 +645,7 @@ module ts {
}

// If symbol is directly available by its name in the symbol table
if (isAccessible(symbols[symbol.name])) {
if (hasProperty(symbols, symbol.name) && isAccessible(symbols[symbol.name])) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I have added a lookup method for Map, it would be more consistent.

Copy link
Member Author

Choose a reason for hiding this comment

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

i will update that when I resolve merge conflicts.

@mhegazy
Copy link
Contributor

mhegazy commented Aug 6, 2014

👍

@sheetalkamat sheetalkamat merged commit e31aa9e into master Aug 6, 2014
sheetalkamat added a commit that referenced this pull request Aug 6, 2014
Report errors for usage of private types when generating declaration file
@sheetalkamat sheetalkamat deleted the privacyErrors branch August 6, 2014 18:52
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
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.

4 participants