Type Alias EnumTypeMap<E, V, T>

EnumTypeMap<E, V, T>: {
    readonly [key in keyof E extends string
        ? keyof E
        : never]: V
} & T

A type that maps the keys of E to the type of V.

Type Parameters

  • E

    The type of object that defines the Key (typically a constant enum)

  • V

    The value type, typically string, number but may also be a complex type.

  • T = {
        readonly [key in keyof E]: V
    }

    The resulting type with the keys from the source type.

    Returned from createSimpleMap