Skip to content

Errors for missing enum-named properties should attempt to preserve names #50375

@DanielRosenwasser

Description

@DanielRosenwasser
enum E {
    A
}

let obj: Record<E, any> = {
    // No implementation
}

Expected:

Property '[E.A]' is missing in type '{}' but required in type 'Record<E, any>'.

Actual:

Property '0' is missing in type '{}' but required in type 'Record<E, any>'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".FixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions