Skip to content

Inappropriate string literal completions in object literals #11232

@DanielRosenwasser

Description

@DanielRosenwasser

Found in microsoft/vscode#12667

var foo;

interface I {
    metadata: string;
    wat: string;
}

var x: I = {
    metadata: "/*$*/"
}

Expected: Completions of every identifier in the file, or no completions at all.
Actual: Completions of property names for the containing object literal's apparent type.

image

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions