Skip to content

Completions broken in module.exports object literal #43289

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
andrewbranch opened this issue Mar 17, 2021 · 0 comments · Fixed by #43755
Closed

Completions broken in module.exports object literal #43289

andrewbranch opened this issue Mar 17, 2021 · 0 comments · Fixed by #43755
Assignees
Labels
Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor

Comments

@andrewbranch
Copy link
Member

Bug Report

🔎 Search Terms

completions module exports

🕗 Version & Regression Information

  • This changed between versions 4.0.5 and 4.1.5

⏯ Playground Link

Playground link with relevant code

💻 Code

function foo() {}
function bar() {}

module.exports = {
    foo,
    b // <-- type 'a' or ctrl+space
};

🙁 Actual behavior

Completions are “self-fulfilling”—you get a completion only for the partial identifier you’ve already typed so far, blocking out even VS Code’s “file identifiers” completions. See also #35709 fixing similar symptoms.

🙂 Expected behavior

You should get completions for in-scope identifiers via #41539. (In TS 4.0 and prior, you would get no completions, which was better than the current behavior, because at least VS Code would give you file identifiers.)

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Mar 18, 2021
@RyanCavanaugh RyanCavanaugh added the Domain: Completion Lists The issue relates to showing completion lists in an editor label Mar 18, 2021
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.3.1 milestone Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants