pg-proto-parser
Version:
The LaunchQL Proto parser
17 lines (16 loc) • 794 B
TypeScript
import { Enum } from '@launchql/protobufjs';
type EnumValueToName = Record<string, Record<number, string>>;
type EnumNameToValue = Record<string, Record<string, number>>;
/**
* Generates a JSON structure mapping enum numeric values to their string names.
* Output format: { EnumName: { 0: 'VALUE1', 1: 'VALUE2', ... } }
* Used for creating enum-to-string mapping files (JSON or TypeScript).
*/
export declare const generateEnum2StrJSON: (enums: Enum[]) => EnumValueToName;
/**
* Generates a JSON structure mapping enum string names to their numeric values.
* Output format: { EnumName: { 'VALUE1': 0, 'VALUE2': 1, ... } }
* Used for creating string-to-enum mapping files (JSON or TypeScript).
*/
export declare const generateEnum2IntJSON: (enums: Enum[]) => EnumNameToValue;
export {};