Skip to content

Completion should prefer literal types in union types #13614

Closed
@notoriousb1t

Description

@notoriousb1t

TypeScript Version: 2.2.0-dev.20170120

Code

interface ICssProperties {
    display: 'inline-block' | string
}

const className: ICssProperties = {
    display: ''
}

Expected behavior:
The auto completion list shows 'inline-block' followed by general string suggestions

Actual behavior:
The auto completion list shows general string suggestions none of which are 'inline-block;

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