Skip to content

Can't autocomplete list of strings when union string | string is present #28743

Closed
@usernamehw

Description

@usernamehw

TypeScript Version: 3.2.1-dev.20181127

Search Terms:

Tried Domain: Completion Lists github label, didn't find a duplicate, there is probably one somewhere...

Code

type ListOrString = 'one' | 'two' | string;
const str: ListOrString = '';// Trigger autocomplete

Expected behavior:

Autocomplete shows

  • one
  • two

Actual behavior:

Only word suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions