Skip to content

Completions broken in module.exports object literal #43289

Closed
@andrewbranch

Description

@andrewbranch

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.)

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editor

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions