UNPKG

protoc-gen-tsd

Version:

Protocol Buffers Compiler(protoc) plugin for TypeScript - Generate definition file(d.ts)

12 lines (11 loc) 686 B
import { FieldDescriptorProto } from 'google-protobuf/google/protobuf/descriptor_pb'; import { ProtoAbstractSyntaxTreeMap } from '../proto-ast-map'; export declare const MESSAGE_TYPE = 11; export declare const BYTES_TYPE = 12; export declare const ENUM_TYPE = 14; export declare const JS_NORMAL = 0; export declare const JS_STRING = 1; export declare const JS_NUMBER = 2; export declare function getTypeName(fieldTypeNum: number): string; export declare function getJsTypeName(fieldTypeNum: number): string; export declare function getFieldType(type: FieldDescriptorProto.Type, typeName: string, currentFileName: string, protoAbstractSyntaxTreeMap: ProtoAbstractSyntaxTreeMap): string;