Debian Codegraph @

node/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.d.ts

raw
1 import type { DescriptorProto_ExtensionRange, FieldDescriptorProto_Label, FieldDescriptorProto_Type, FieldOptions_OptionRetention, FieldOptions_OptionTargetType, FieldOptions_EditionDefault, EnumValueDescriptorProto, FileDescriptorProto } from "../wkt/gen/google/protobuf/descriptor_pb.js";
2 import type { DescFile } from "../descriptors.js";
3 /**
4 * Hydrate a file descriptor for google/protobuf/descriptor.proto from a plain
5 * object.
6 *
7 * See createFileDescriptorProtoBoot() for details.
8 *
9 * @private
10 */
11 export declare function boot(boot: FileDescriptorProtoBoot): DescFile;
12 /**
13 * An object literal for initializing the message google.protobuf.FileDescriptorProto
14 * for google/protobuf/descriptor.proto.
15 *
16 * See createFileDescriptorProtoBoot() for details.
17 *
18 * @private
19 */
20 export type FileDescriptorProtoBoot = {
21 name: "google/protobuf/descriptor.proto";
22 package: "google.protobuf";
23 messageType: DescriptorProtoBoot[];
24 enumType: EnumDescriptorProtoBoot[];
25 };
26 export type DescriptorProtoBoot = {
27 name: string;
28 field?: FieldDescriptorProtoBoot[];
29 nestedType?: DescriptorProtoBoot[];
30 enumType?: EnumDescriptorProtoBoot[];
31 extensionRange?: Pick<DescriptorProto_ExtensionRange, "start" | "end">[];
32 };
33 export type FieldDescriptorProtoBoot = {
34 name: string;
35 number: number;
36 label?: FieldDescriptorProto_Label;
37 type: FieldDescriptorProto_Type;
38 typeName?: string;
39 extendee?: string;
40 defaultValue?: string;
41 options?: FieldOptionsBoot;
42 };
43 export type FieldOptionsBoot = {
44 packed?: boolean;
45 deprecated?: boolean;
46 retention?: FieldOptions_OptionRetention;
47 targets?: FieldOptions_OptionTargetType[];
48 editionDefaults?: FieldOptions_EditionDefaultBoot[];
49 };
50 export type FieldOptions_EditionDefaultBoot = Pick<FieldOptions_EditionDefault, "edition" | "value">;
51 export type EnumDescriptorProtoBoot = {
52 name: string;
53 value: EnumValueDescriptorProtoBoot[];
54 };
55 export type EnumValueDescriptorProtoBoot = Pick<EnumValueDescriptorProto, "name" | "number">;
56 /**
57 * Creates the message google.protobuf.FileDescriptorProto from an object literal.
58 *
59 * See createFileDescriptorProtoBoot() for details.
60 *
61 * @private
62 */
63 export declare function bootFileDescriptorProto(init: FileDescriptorProtoBoot): FileDescriptorProto;