Skip to content

No completion for properties in object type unless comma or semicolon is usedΒ #62117

@aleksei-berezkin

Description

@aleksei-berezkin

πŸ”Ž Search Terms

completion generic object properties separator newline

πŸ•— Version & Regression Information

Same in TS 3.3

⏯ Playground Link

Link

πŸ’» Code

type Foo<T extends { bar: string, baz: string }> = T

type Foo1 = Foo<{
    bar: string
    // start typing baz - no completion
}>

πŸ™ Actual behavior

No completion is shown for the baz property if the previous line (bar: string) is not terminated with a comma or semicolon

πŸ™‚ Expected behavior

Completion should work even when the object members are separated by newlines only, without requiring a comma or semicolon

Additional information about the issue

Prettier formats object types with newlines

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: Completion ListsThe issue relates to showing completion lists in an editorHelp WantedYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions