protoc-gen-tsd
Version:
Protocol Buffers Compiler(protoc) plugin for TypeScript - Generate definition file(d.ts)
11 lines (10 loc) • 435 B
TypeScript
import { FieldDescriptorProto, OneofDescriptorProto } from 'google-protobuf/google/protobuf/descriptor_pb';
export interface IOneofDescriptorProtoModel {
indent: string;
oneofName: string;
oneofNameUpper: string;
fields: {
[key: string]: number;
};
}
export declare function formatOneofProto(oneofDecl: OneofDescriptorProto, oneofFields: FieldDescriptorProto[], indent: string): IOneofDescriptorProtoModel;