Type Alias EnumNameMap<E, T>

EnumNameMap<E, T>: {
    readonly [key in keyof E extends string | number | symbol
        ? keyof E
        : never]: key extends string
        ? key
        : keyof E
} & T

A type that identifies an object whose property values are generally mapped to the key of the source type.

Type Parameters

  • E = any

    The source constant enum type which identifies the keys and values

  • T = {
        readonly [key in keyof E]: key extends string
            ? key
            : keyof E
    }

    The resulting type with the keys from the source type.

    Returned from createEnumKeyMap