@xmobitea/gn-server
Version:
GearN Server by XmobiTea (Pro)
25 lines (24 loc) • 1.06 kB
TypeScript
export declare class EnumUtility {
private static enumKeyCache;
/**
* Returns the enum keys.
* @param enumType Provides the enum type value used by this operation.
* @returns Returns the enum keys.
*/
private static getEnumKeys;
/**
* Executes the parse workflow.
* @param enumType Provides the enum type value used by this operation.
* @param value Provides the value value used by this operation.
* @param ignoreCase Provides the ignore case value used by this operation.
* @returns Returns the operation result.
*/
static parse<T extends Record<string, number | string>>(enumType: T, value: string, ignoreCase?: boolean): T[keyof T];
/**
* Executes the to string workflow.
* @param enumType Provides the enum type value used by this operation.
* @param value Provides the value value used by this operation.
* @returns Returns the operation result.
*/
static toString<T extends Record<string, number | string>>(enumType: T, value: T[keyof T]): string;
}