Skip to content

Output from selecting optional property from auto complete modal incorrectly includes ? in JS object #1568

@omonk

Description

@omonk
type T = {
  name?: string;
  age: number;
};

const obj: T = {};

When adding a value to obj, when typing the name key, the auto complete opens and includes name?, selecting this option will output name? in the object property identifier.

Image
const obj: T = {
  name?: "foo"
};

This does not happen when using ^ space / editor.action.triggerSuggest and selecting the name option from the list.

Image Image

Metadata

Metadata

Assignees

Labels

Domain: EditorRelated to the LSP server, editor experiencebugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions