Skip to content

Fix export * that resolves to something type-only #36558

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
Jan 31, 2020

Conversation

andrewbranch
Copy link
Member

Didn’t touch these functions originally since they can’t be type-only aliases, but they can resolve to type-only aliases, so they need to propagate the marker along the alias resolution.

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

Are we already handling

//@filename: exporter.ts
class Foo {}
export = Foo;
// @filename: importer.ts
import type * as Foo from "./exporter";
new Foo();

?

@andrewbranch
Copy link
Member Author

Yep—in that case it doesn’t even matter how the alias resolves, because the type keyword is found right away: playground (nightly)

@andrewbranch andrewbranch merged commit 86556d6 into microsoft:master Jan 31, 2020
@andrewbranch andrewbranch deleted the bug/type-only branch January 31, 2020 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants