@deepkit/core
Version:
Deepkit core library
32 lines (31 loc) • 812 B
TypeScript
/**
* Returns the enum label for a given enum value.
*
* @public
*/
export declare function getEnumLabel(enumType: {
[field: string]: any;
}, id: any): any;
/**
* Returns all possible enum labels.
*
* @public
*/
export declare function getEnumLabels(enumDefinition: any): string[];
/**
* Returns all possible enum keys.
*
* @public
*/
export declare function getEnumValues(enumDefinition: any): any[];
export declare function getEnumKeyLabelMap(enumDefinition: any): Map<any, string>;
/**
* Checks whether given enum value is valid.
*
* @public
*/
export declare function isValidEnumValue(enumDefinition: any, value: any, allowLabelsAsValue?: boolean): boolean;
/**
* @public
*/
export declare function getValidEnumValue(enumDefinition: any, value: any, allowLabelsAsValue?: boolean): any;