| 1 |
import type { DescEnum, DescExtension, DescMessage, DescService } from "../descriptors.js"; |
| 2 |
import { type FileDescriptorProto } from "../wkt/gen/google/protobuf/descriptor_pb.js"; |
| 3 |
import type { FileDescriptorProtoBoot } from "./boot.js"; |
| 4 |
type EmbedUnknown = { |
| 5 |
bootable: false; |
| 6 |
proto(): FileDescriptorProto; |
| 7 |
base64(): string; |
| 8 |
}; |
| 9 |
type EmbedDescriptorProto = Omit<EmbedUnknown, "bootable"> & { |
| 10 |
bootable: true; |
| 11 |
boot(): FileDescriptorProtoBoot; |
| 12 |
}; |
| 13 |
/** |
| 14 |
* Create necessary information to embed a file descriptor in |
| 15 |
* generated code. |
| 16 |
* |
| 17 |
* @private |
| 18 |
*/ |
| 19 |
export declare function embedFileDesc(file: FileDescriptorProto): EmbedUnknown | EmbedDescriptorProto; |
| 20 |
/** |
| 21 |
* Compute the path to a message, enumeration, extension, or service in a |
| 22 |
* file descriptor. |
| 23 |
* |
| 24 |
* @private |
| 25 |
*/ |
| 26 |
export declare function pathInFileDesc(desc: DescMessage | DescEnum | DescExtension | DescService): number[]; |
| 27 |
/** |
| 28 |
* The file descriptor for google/protobuf/descriptor.proto cannot be embedded |
| 29 |
* in serialized form, since it is required to parse itself. |
| 30 |
* |
| 31 |
* This function takes an instance of the message, and returns a plain object |
| 32 |
* that can be hydrated to the message again via bootFileDescriptorProto(). |
| 33 |
* |
| 34 |
* This function only works with a message google.protobuf.FileDescriptorProto |
| 35 |
* for google/protobuf/descriptor.proto, and only supports features that are |
| 36 |
* relevant for the specific use case. For example, it discards file options, |
| 37 |
* reserved ranges and reserved names, and field options that are unused in |
| 38 |
* descriptor.proto. |
| 39 |
* |
| 40 |
* @private |
| 41 |
*/ |
| 42 |
export declare function createFileDescriptorProtoBoot(proto: FileDescriptorProto): FileDescriptorProtoBoot; |
| 43 |
export {}; |