@protobuf-ts/plugin
Version:
The protocol buffer compiler plugin "protobuf-ts" generates TypeScript, gRPC-web, Twirp, and more.
100 lines (99 loc) • 3 kB
TypeScript
import type { GenEnum, GenExtension, GenFile } from "@bufbuild/protobuf/codegenv1";
import type { FileOptions, ServiceOptions } from "@bufbuild/protobuf/wkt";
/**
* Describes the file protobuf-ts.proto.
*/
export declare const file_protobuf_ts: GenFile;
/**
* The available client styles that can be generated by @protobuf-ts/plugin
*
* @generated from enum ts.ClientStyle
*/
export declare enum ClientStyle {
/**
* Do not emit a client for this service.
*
* @generated from enum value: NO_CLIENT = 0;
*/
NO_CLIENT = 0,
/**
* Use the generic implementations of @protobuf-ts/runtime-rpc.
* This is the default behaviour.
*
* @generated from enum value: GENERIC_CLIENT = 1;
*/
GENERIC_CLIENT = 1,
/**
* Generate a client using @grpc/grpc-js (major version 1).
*
* @generated from enum value: GRPC1_CLIENT = 4;
*/
GRPC1_CLIENT = 4
}
/**
* Describes the enum ts.ClientStyle.
*/
export declare const ClientStyleSchema: GenEnum<ClientStyle>;
/**
* The available server styles that can be generated by @protobuf-ts/plugin
*
* @generated from enum ts.ServerStyle
*/
export declare enum ServerStyle {
/**
* Do not emit a server for this service.
* This is the default behaviour.
*
* @generated from enum value: NO_SERVER = 0;
*/
NO_SERVER = 0,
/**
* Generate a generic server interface.
* Adapters be used to serve the service, for example @protobuf-ts/grpc-backend
* for gRPC.
*
* @generated from enum value: GENERIC_SERVER = 1;
*/
GENERIC_SERVER = 1,
/**
* Generate a server for @grpc/grpc-js (major version 1).
*
* @generated from enum value: GRPC1_SERVER = 2;
*/
GRPC1_SERVER = 2
}
/**
* Describes the enum ts.ServerStyle.
*/
export declare const ServerStyleSchema: GenEnum<ServerStyle>;
/**
* Exclude field or method options from being emitted in reflection data.
*
* For example, to stop the data of the "google.api.http" method option
* from being exported in the reflection information, set the following
* file option:
*
* ```proto
* option (ts.exclude_options) = "google.api.http";
* ```
*
* The option can be set multiple times.
* `*` serves as a wildcard and will greedily match anything.
*
* @generated from extension: repeated string exclude_options = 777701;
*/
export declare const exclude_options: GenExtension<FileOptions, string[]>;
/**
* Generate a client for this service with this style.
* Can be set multiple times to generate several styles.
*
* @generated from extension: repeated ts.ClientStyle client = 777701;
*/
export declare const client: GenExtension<ServiceOptions, ClientStyle[]>;
/**
* Generate a server for this service with this style.
* Can be set multiple times to generate several styles.
*
* @generated from extension: repeated ts.ServerStyle server = 777702;
*/
export declare const server: GenExtension<ServiceOptions, ServerStyle[]>;