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

import * as namespace is not checked #17

Open
whzx5byb opened this issue Feb 15, 2024 · 1 comment
Open

import * as namespace is not checked #17

whzx5byb opened this issue Feb 15, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@whzx5byb
Copy link

When import a file via import * as, there is still a chance to expose package/private exports to outside. Is it a bug or design limitation?

// ----- sub/foo.ts -----
/** @public */
export const public_var = 0;

/** @package */
export const package_var = 0;

// ----- baz.ts -----
import * as Foo from "./sub/foo";
Foo.public_var;
Foo.package_var;
    // ^ expect error here
@uhyo uhyo added bug Something isn't working help wanted Extra attention is needed labels Feb 15, 2024
@uhyo
Copy link
Owner

uhyo commented Feb 15, 2024

Thanks for the report!

I don't remember any technical difficulty about this, so it should be just an oversight. I'm not quite sure what we should do against Foo[runtime_value] though...

Want to work on this, but I have limited spare time now... Leaving a help wanted label for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants