Installation
npm install --save @types/protoc-plugin
Summary
This package contains type definitions for protoc-plugin (https://github.com/konsumer/node-protoc-plugin/).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/protoc-plugin.
index.d.ts
/// <reference types="node" />
import {
CodeGeneratorRequest as pb_CodeGeneratorRequest,
CodeGeneratorResponse as pb_CodeGeneratorResponse,
} from "google-protobuf/google/protobuf/compiler/plugin_pb";
import { FileDescriptorProto, SourceCodeInfo } from "google-protobuf/google/protobuf/descriptor_pb";
import * as stream from "stream";
import Location = SourceCodeInfo.Location;
type OutputFiles = pb_CodeGeneratorResponse.File.AsObject[];
type SimplePluginCallback = (
filesToGenerate: readonly FileDescriptorProto.AsObject[],
) => OutputFiles | Promise<OutputFiles>;
declare function simplePlugin(cb: SimplePluginCallback): Promise<void>;
declare namespace simplePlugin {
function CodeGeneratorRequest(stdin?: stream.Readable): Promise<pb_CodeGeneratorRequest>;
function CodeGeneratorResponse(stdout?: stream.Writable): (files: OutputFiles) => void;
function CodeGeneratorResponseError(stdout?: stream.Writable): (err: Error) => void;
function findCommentByPath(path: number[], locationList: Location.AsObject[]): string;
}
export = simplePlugin;
Additional Details
- Last updated: Mon, 20 Nov 2023 23:36:24 GMT
- Dependencies: @types/google-protobuf, @types/node
Credits
These definitions were written by Jonny Reeves.