/** * Class containing static helpers for enum objects. */ export default class Enum { /** * Get all the names (actually keys) of the enumeration item. This will only return names defined in the * enumeration, not the indices. This method can be used with any enumeration object, be it number or * string. * * @param enumObject - The enumeration object to extract names from. * @returns An array containing all enumeration names. */ static getAllNames(enumObject: T): Array; /** * Get the enumeration name for the given initialization value. This method can only be used with string * enumerations as retrieving the name of a number enumeration item is trivial. * * @param enumObject - The enumeration object in which to search for names. * @param initValue - The initialization value of the name. * @returns The found name or undefined if no matching name found. */ static getName(enumObject: T, initValue: T[keyof T]): (keyof T & string) | undefined; }