Skip to content

Import suggestion behaviour differs between export = (CommonJS/AMD) and default exports #25402

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

Closed
OliverJAsh opened this issue Jul 3, 2018 · 1 comment
Labels
Duplicate An existing issue was already created

Comments

@OliverJAsh
Copy link
Contributor

TypeScript Version: 2.9.2

Search Terms: import suggestion export default

Code

declare module 'foo/bar' {
    const bar = 1;
    export = bar;
}

declare module 'foo/baz' {
    const baz = 1;
    export default baz;
}

// Doesn't have import suggestions
bar;

// Does have Import suggestions
baz;

I think these should behave the same. The behaviour for default exports is useful and should also apply to export = (CommonJS/AMD)?

@ghost
Copy link

ghost commented Jul 3, 2018

Duplicate of #25135

@ghost ghost marked this as a duplicate of #25135 Jul 3, 2018
@ghost ghost added the Duplicate An existing issue was already created label Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

1 participant