You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
612 B
19 lines
612 B
2 months ago
|
import type { DescEnum, DescFile } from "../descriptors.js";
|
||
|
import type { GenEnum } from "./types.js";
|
||
|
import type { JsonValue } from "../json-value.js";
|
||
|
/**
|
||
|
* Hydrate an enum descriptor.
|
||
|
*
|
||
|
* @private
|
||
|
*/
|
||
|
export declare function enumDesc<Shape extends number, JsonType extends JsonValue = JsonValue>(file: DescFile, path: number, ...paths: number[]): GenEnum<Shape, JsonType>;
|
||
|
/**
|
||
|
* Construct a TypeScript enum object at runtime from a descriptor.
|
||
|
*/
|
||
|
export declare function tsEnum(desc: DescEnum): enumObject;
|
||
|
type enumObject = {
|
||
|
[key: number]: string;
|
||
|
[k: string]: number | string;
|
||
|
};
|
||
|
export {};
|