export interface EnumValue { readonly kind: T; readonly code: number; readonly name: string; } export type EnumMethods = { values(): EnumValue[]; is(value: any): boolean; fromName(name: string): EnumValue | undefined; fromCode(code: number): EnumValue | undefined; }; export type Enum = { [P in keyof R]: EnumValue; }; export type EnumMap = { [id: string]: [number, string]; }; export type EnumDecl = Enum & EnumMethods; /** * Generate a typed enum having the given kind and values, along * with some helper methods. */ export declare const enum_: (kind: T, map: R) => EnumDecl;