Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Should provide object member completions when missing commas; also should insert missing commas #52604

Copy link
Copy link
@DanielRosenwasser

Description

@DanielRosenwasser
Issue body actions

Today, if you try to request completions after an object literal element that has no comma, you'll get no useful contextual completions.

interface ColorPalette {
    primary?: string;
    secondary?: string;
}

let colors: ColorPalette = {
    primary: "red"
    /*$*/
};

image

interface ColorPalette {
    primary?: string;
    secondary?: string;
}

let colors: ColorPalette = {
    primary: "red"
    seconda/*$*/
};

image

My proposal is that we do something similar to what we do in class elements, but maybe a little smarter.

We should continue to provide contextual completions, and also, those completions should automatically insert the , on the previous line.

danilofuchs, FlickerLogicalStack, aymericbouzy and andriyor

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorEffort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".Good issue if you're already used to contributing to the codebase. Harder than "good first issue".Fix AvailableA PR has been opened for this issueA PR has been opened for this issueHelp WantedYou can do thisYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.