UNPKG

pg-proto-parser

Version:
14 lines (13 loc) 775 B
import * as t from '@babel/types'; /** * Maps protobuf primitive types to their TypeScript equivalents. * Handles numeric types, strings, booleans, bytes, and bigints. * Falls back to type references for custom/non-primitive types. */ export declare const getTSType: (type?: string) => t.TSBooleanKeyword | t.TSBigIntKeyword | t.TSNumberKeyword | t.TSStringKeyword | t.TSTypeReference; /** * Resolves a type name to its TypeScript AST representation. * Delegates to getTSType for primitives, creates type references for custom types. * This is the main entry point for type resolution in the code generator. */ export declare const resolveTypeName: (type: string) => t.TSBooleanKeyword | t.TSBigIntKeyword | t.TSNumberKeyword | t.TSStringKeyword | t.TSTypeReference;