Skip to content

auto-suggest a constant holding a literal value of an expected literal type #25553

@zpdDG4gta8XKpMCd

Description

@zpdDG4gta8XKpMCd
type X: 'x';
const x: X = 'x';
type Y: 'y';
const y: Y = 'y';
type Z = X | Y;
declare const z: Z;
switch (z) {
    case 
      // ^ caret is here
}

after pressing Ctrl + Space it would be nice to see these suggestions: x, y, 'x', 'y'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Too ComplexAn issue which adding support for may be too complex for the value it adds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions