UNPKG

1.51 kBTypeScriptView Raw
1import { CodeGeneratorResponse } from "google-protobuf/google/protobuf/compiler/plugin_pb";
2import { FileDescriptorProto, ServiceDescriptorProto } from "google-protobuf/google/protobuf/descriptor_pb";
3import { ExportMap } from "../ExportMap";
4export declare function createFile(output: string, filename: string): CodeGeneratorResponse.File;
5export declare type ImportDescriptor = {
6 readonly namespace: string;
7 readonly path: string;
8};
9export declare type RPCMethodDescriptor = {
10 readonly nameAsPascalCase: string;
11 readonly nameAsCamelCase: string;
12 readonly functionName: string;
13 readonly serviceName: string;
14 readonly requestStream: boolean;
15 readonly responseStream: boolean;
16 readonly requestType: string;
17 readonly responseType: string;
18};
19export declare class RPCDescriptor {
20 private readonly grpcService;
21 private readonly protoService;
22 private readonly exportMap;
23 constructor(grpcService: GrpcServiceDescriptor, protoService: ServiceDescriptorProto, exportMap: ExportMap);
24 readonly name: string;
25 readonly qualifiedName: string;
26 readonly methods: RPCMethodDescriptor[];
27}
28export declare class GrpcServiceDescriptor {
29 private readonly fileDescriptor;
30 private readonly exportMap;
31 private readonly pathToRoot;
32 constructor(fileDescriptor: FileDescriptorProto, exportMap: ExportMap);
33 readonly filename: string;
34 readonly packageName: string;
35 readonly imports: ImportDescriptor[];
36 readonly services: RPCDescriptor[];
37}