UNPKG

1.03 kBTypeScriptView Raw
1import { FileDescriptorProto, DescriptorProto, MessageOptions, EnumOptions, FieldDescriptorProto } from "google-protobuf/google/protobuf/descriptor_pb";
2import Type = FieldDescriptorProto.Type;
3declare type MapFieldOptions = {
4 key: [Type, string | null];
5 value: [Type, string | null];
6};
7export declare type ExportMessageEntry = {
8 pkg: string;
9 fileName: string;
10 messageOptions?: MessageOptions;
11 mapFieldOptions?: MapFieldOptions;
12};
13export declare type ExportEnumEntry = {
14 pkg: string;
15 fileName: string;
16 enumOptions?: EnumOptions;
17};
18export declare class ExportMap {
19 messageMap: {
20 [key: string]: ExportMessageEntry;
21 };
22 enumMap: {
23 [key: string]: ExportEnumEntry;
24 };
25 exportNested(scope: string, fileDescriptor: FileDescriptorProto, message: DescriptorProto): void;
26 addFileDescriptor(fileDescriptor: FileDescriptorProto): void;
27 getMessage(str: string): ExportMessageEntry | undefined;
28 getEnum(str: string): ExportEnumEntry | undefined;
29}
30export {};