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

Error "Exported variable has or is using name... but cannot be named" not always suppressed by * imports #11534

Closed
danielearwicker opened this issue Oct 11, 2016 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@danielearwicker
Copy link

TypeScript Version: 2.0.3

Code

See this repository: https://github.com/danielearwicker/tsrepro1

Expected behavior:
In test5.ts we don't get the error because we import SomeType explicitly.

In test4.ts we don't get the error because we import everything from the source module using import * as...

In the remaining three tests it seems we should not get the error, as we are doing the same thing as test4.ts except via various wrapper modules which import and re-export all the contents of the source module.

Actual behavior:

In test1 through test3 we get:

Exported variable 'foo' has or is using name 'SomeType' 
from external module ".../source" but cannot be named.

For example wrapper1 says:

export * from "./source"

So it seems like what works with source should work with wrapper1.

@robyoder
Copy link

#9944 is the same issue (I think), but this one more clearly describes my setup.

@mhegazy
Copy link
Contributor

mhegazy commented Nov 22, 2016

I believe the original issue is a duplicate of #8612 and #5938 and

@mhegazy mhegazy added the Duplicate An existing issue was already created label Nov 22, 2016
@mhegazy mhegazy closed this as completed Apr 21, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants