Skip to content

Rework declaration emit visibility calculation for namespaces #32156

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
Jun 28, 2019

Conversation

weswigham
Copy link
Member

So that it emits export {}; to retain privates, just like the top-level does.

Fixes #31487

@@ -287,4 +287,5 @@ declare module m {
foo114: m2.public2;
foo115: m2.public2;
}
export {};
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need this here? exported class above is enough to make things public and private ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not in a declaration file (or other ambient context) it's not. 😄 Just like at the top level, unless there's an export declaration or export assignment, all the things are implicitly exported, export modifier or no.

Copy link
Member

Choose a reason for hiding this comment

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

oh I see :)

@weswigham
Copy link
Member Author

F. Need to rerun tests with --skipPercent=0 - apparently some of the low-value tests are declaration emit related. :P

@weswigham weswigham requested a review from sheetalkamat June 28, 2019 20:03
@weswigham weswigham merged commit b4a1a59 into microsoft:master Jun 28, 2019
@weswigham weswigham deleted the decl-namespace-privacy branch June 28, 2019 20:23
sheetalkamat added a commit that referenced this pull request Jul 16, 2019
… after LKG

Its not detected currently is because LKG doesnt have #32156
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.

Visibility of types in an export = namespace varies between .ts and .d.ts files
2 participants