Skip to content

Enum reverse mapping is not generatedΒ #61488

@npenin

Description

@npenin

πŸ”Ž Search Terms

enum reverse mapping

πŸ•— Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about enums or reverse mapping

⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.8.2#code/PQKhCgAIUhRA7ArgW0gJwKYAdMGcPwAuAlvAOaQBGpAhmgJ6QD2WGaNhTauAdFCMHAYAHli6FIBFJABCtBgHlW7TmnABvKJG2wAjohoAbSAF5IAchMnzAGi3aAyoTTEAxoT0HjZy1dv3IADkmD30jUwsAQms7bUdnN0Jg0K8I82iYgIAZDFxcABUACxp4NIAefzjIHLyikoU0T3CfMsyqgHFMDjY60p8APkq4zoxutF6Gpu8Lfra4gEF4ABM0gDJVoe0GtIAfHc3IAFlSRFw0gFoDgAVDU7SAagPDpiXEQyY0gFIDgBFiADc0sADvliMhcmkQNcmAB3NIAPV+ITSPAOAEVELkSEx4D9kT4APyo2JxABiXGQHDSAGIDgBVeAAa3gsL6FmE5nAAF9wEA

πŸ’» Code

export enum BinaryOperator
{
    Equal = '==',
    StrictEqual = '===',
    NotEqual = '!=',
    StrictNotEqual = '!==',
    LessThan = '<',
    LessThanOrEqual = '<=',
    GreaterThan = '>',
    GreaterThanOrEqual = '>=',
    And = '&&',
    Or = '||',
    Minus = '-',
    Plus = '+',
    Modulo = '%',
    Div = '/',
    Times = '*',
    Pow = '^',
    Dot = '.',
    QuestionDot = '?.',
    Format = '#',
    Unknown = 'x'
}

πŸ™ Actual behavior

Reverse mapping is not generated

πŸ™‚ Expected behavior

Reverse mapping should be generated as stated in https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions