{"id":13485037,"url":"https://github.com/agreatfool/grpc_tools_node_protoc_ts","last_synced_at":"2026-02-14T00:29:31.317Z","repository":{"id":21645383,"uuid":"93495515","full_name":"agreatfool/grpc_tools_node_protoc_ts","owner":"agreatfool","description":"Generate TypeScript d.ts definitions for generated js files from grpc_tools_node_protoc","archived":false,"fork":false,"pushed_at":"2024-08-30T23:31:36.000Z","size":835,"stargazers_count":501,"open_issues_count":22,"forks_count":58,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-26T23:04:37.520Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agreatfool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-06T08:37:24.000Z","updated_at":"2025-03-21T13:16:21.000Z","dependencies_parsed_at":"2024-10-08T12:18:49.343Z","dependency_job_id":"c7784fb0-77b8-4399-8c96-d079bc7bc610","html_url":"https://github.com/agreatfool/grpc_tools_node_protoc_ts","commit_stats":{"total_commits":253,"total_committers":27,"mean_commits":9.37037037037037,"dds":"0.20158102766798414","last_synced_commit":"e6608b650c7a4f98cb3019c6434629fc6e2ed910"},"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agreatfool%2Fgrpc_tools_node_protoc_ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agreatfool%2Fgrpc_tools_node_protoc_ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agreatfool%2Fgrpc_tools_node_protoc_ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agreatfool%2Fgrpc_tools_node_protoc_ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agreatfool","download_url":"https://codeload.github.com/agreatfool/grpc_tools_node_protoc_ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245892459,"owners_count":20689506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:01:43.472Z","updated_at":"2026-02-14T00:29:26.260Z","avatar_url":"https://github.com/agreatfool.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"grpc_tools_node_protoc_ts\n=========================\n\n![](https://img.shields.io/badge/License-MIT-blue.svg) ![](https://img.shields.io/npm/v/grpc_tools_node_protoc_ts) ![](https://img.shields.io/npm/dw/grpc_tools_node_protoc_ts) ![](https://img.shields.io/github/stars/agreatfool/grpc_tools_node_protoc_ts) ![](https://img.shields.io/github/last-commit/agreatfool/grpc_tools_node_protoc_ts)\n\n## TOC\n\n* [Aim](#aim)\n* [Breaking changes](#breaking-changes)\n* [How to use](#how-to-use)\n* [Example](#example)\n* [Changes](#changes)\n* [About jstype options of protobuf](#about-jstype-options-of-protobuf)\n* [About vulnerability](#about-vulnerability)\n* [About Docker](#about-docker)\n* [Environment](#environment)\n* [Credits](#credits)\n\n## Aim\nGenerate corresponding TypeScript d.ts codes according to js codes generated by [grpc_tools_node_protoc](https://www.npmjs.com/package/grpc-tools).\n\nMore information about grpc_tools_node_protoc (grpc-tools):\n\n* [npm](https://www.npmjs.com/package/grpc-tools)\n* [source code](https://github.com/grpc/grpc-node/tree/master/packages/grpc-tools)\n* [doc how to use](https://github.com/grpc/grpc/blob/master/examples/node/static_codegen/README.md)\n\nAnd the versions over 3.0.0 support [@grpc/grpc-js](https://www.npmjs.com/package/@grpc/grpc-js)(grpc-tools@1.8.1 required). Please read the doc: [@grpc/grpc-js support](https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/v5.0.0/doc/grpcjs_support.md). **New version 5.0.0 is recommended for users who using grpc-tools over v1.9.0.**\n\n## Breaking changes\n### v5.3.0\nSince `@grpc/grpc-js@1.2.0` fixed the signature issue of `handleClientStreamingCall` exporting. It's no longer necessary to import it manually in `*_pb.d.ts` files like:\n\n```typescript\nimport {handleClientStreamingCall} from \"@grpc/grpc-js/build/src/server-call\";\n```\n\nUsers who are using versions lower than `@grpc/grpc-js@1.2.0` would be impacted, need to upgrade.\n\n### v5.2.0\nAdd support for proto3 `optional`. `grpc-tools` version of `1.11.1` is `REQUIRED`. See: [Issue#88](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/88) and [PR#97](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/97).\n\n### v5.1.0\nFix server implementation signature issue of `grpc_js` side. See: [Issue#79](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/79).\n\nAbout the code changes, please read the doc at [**Changes**](#changes) part. Also, please read this doc for more information: [@grpc/grpc-js server implementation signature issue](https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/v5.1.1/doc/server_impl_signature.md).\n\n### v4.0.0\nFix the issues along with [grpc-tools@1.9.0](https://github.com/grpc/grpc-node/releases/tag/grpc-tools%401.9.0), see: [PR#55](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/55). If you are using grpc-tools with version under `1.9.0`, you should `NOT` upgrade.\n\nAlso, if you want to use chain setters, you have to upgrade the version of package `google-protobuf` to at least `3.10.0`. See the difference: [v3.9.0](https://github.com/protocolbuffers/protobuf/blob/v3.9.0/js/message.js#L1088) vs [v3.10.0](https://github.com/protocolbuffers/protobuf/blob/v3.10.0/js/message.js#L1109).\n\n### v2.4.0\nThe return value of type `ClientReadableStream` was wrong previously. And has been fixed in this version. Please be careful to update your code.\nSee detail: [PR#30](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/30).\n\n### v2.2.0\nFix definition changes according to the version change of grpc official TypeScript definition, see: [index.d.ts@1.9.0](https://github.com/grpc/grpc-node/blob/v1.9.0/packages/grpc-native-core/index.d.ts).    \nDetailed changes could be found here: [PR#14](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/14/files).\n\n### v2.0.0\nSince v2.x.x, current project supports the official definition of grpc, see: [index.d.ts@1.8.4](https://github.com/grpc/grpc-node/blob/v1.8.4/packages/grpc-native-core/index.d.ts).     \nThough the usage of tool, and generated codes shall not been changed, it's good to be double checked in your project when upgrade.\n\nTSLint has been disabled in generated files. Please see the conversation: [#13](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/13).\n\n## How to use\n```bash\nnpm install grpc_tools_node_protoc_ts --save-dev\n\n# generate js codes via grpc-tools\ngrpc_tools_node_protoc \\\n--js_out=import_style=commonjs,binary:./your_dest_dir \\\n--grpc_out=grpc_js:./your_dest_dir \\\n--plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` \\\n-I ./proto \\\n./your_proto_dir/*.proto\n\n# generate d.ts codes\nprotoc \\\n--plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts \\\n--ts_out=grpc_js:./your_dest_dir \\\n-I ./proto \\\n./your_proto_dir/*.proto\n```\n\n## Example\nThere is a complete \u0026 runnable example in folder `examples`.\n\nDirs:\n\n* proto: sample proto definition\n* bash: useful commands\n    * build.sh: build js \u0026 d.ts codes from proto file, and tsc to build/*.js\n    * server.sh: start the server\n    * client.sh: start the client \u0026 send requests\n\n### examples/proto/book.proto\n```proto\nsyntax = \"proto3\";\n\npackage com.book;\n\nmessage Book {\n    int64 isbn = 1;\n    string title = 2;\n    string author = 3;\n}\n\nmessage GetBookRequest {\n    int64 isbn = 1;\n}\n\nmessage GetBookViaAuthor {\n    string author = 1;\n}\n\nservice BookService {\n    rpc GetBook (GetBookRequest) returns (Book) {}\n    rpc GetBooksViaAuthor (GetBookViaAuthor) returns (stream Book) {}\n    rpc GetGreatestBook (stream GetBookRequest) returns (Book) {}\n    rpc GetBooks (stream GetBookRequest) returns (stream Book) {}\n}\n\nmessage BookStore {\n    string name = 1;\n    map\u003cint64, string\u003e books = 2;\n}\n\nenum EnumSample {\n    option allow_alias = true;\n    UNKNOWN = 0;\n    STARTED = 1;\n    RUNNING = 1;\n    caseTest = 2;\n    How_about_This = 3;\n    alllowercase = 4;\n}\n\n// Message with reserved keywords\n// see: https://github.com/google/protobuf/blob/cc3fa2ec80d196e045ae05797799f079188106f3/js/compatibility_tests/v3.0.0/test.proto#L66-L72\nmessage SpecialCases {\n    string normal = 1;\n    // Examples of Js reserved names that are converted to pb_\u003cname\u003e.\n    string default = 2;\n    string function = 3;\n    string var = 4;\n}\n\nmessage OneOfSample {\n    oneof singleword {\n        bool a1 = 1;\n        bool b1 = 2;\n    }\n\n    oneof two_words {\n        bool a_2 = 3;\n        bool b_2 = 4;\n    }\n}\n\nmessage ExtMsgString {\n    string extension = 1;\n}\n\nmessage ExtMsgList {\n    repeated string extension = 1;\n}\n\nmessage ExtMsgByte {\n    bytes extension = 1;\n}\n\nmessage ExtMsgByteList {\n    repeated bytes extension = 1;\n}\n\nmessage ExtMsgMap {\n    map\u003cstring, string\u003e extension = 1;\n}\n\nmessage ExtMsgOneOf {\n    oneof ext {\n        string extension = 1;\n    }\n}\n\nmessage OptTest {\n    optional string name = 1;\n}\n```\n\n### examples/grpcjs/proto/book_pb.d.ts\n```typescript\n// package: com.book\n// file: book.proto\n\n/* tslint:disable */\n/* eslint-disable */\n\nimport * as jspb from \"google-protobuf\";\n\nexport class Book extends jspb.Message {\n    getIsbn(): number;\n    setIsbn(value: number): Book;\n    getTitle(): string;\n    setTitle(value: string): Book;\n    getAuthor(): string;\n    setAuthor(value: string): Book;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): Book.AsObject;\n    static toObject(includeInstance: boolean, msg: Book): Book.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: Book, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): Book;\n    static deserializeBinaryFromReader(message: Book, reader: jspb.BinaryReader): Book;\n}\n\nexport namespace Book {\n    export type AsObject = {\n        isbn: number,\n        title: string,\n        author: string,\n    }\n}\n\nexport class GetBookRequest extends jspb.Message {\n    getIsbn(): number;\n    setIsbn(value: number): GetBookRequest;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): GetBookRequest.AsObject;\n    static toObject(includeInstance: boolean, msg: GetBookRequest): GetBookRequest.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: GetBookRequest, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): GetBookRequest;\n    static deserializeBinaryFromReader(message: GetBookRequest, reader: jspb.BinaryReader): GetBookRequest;\n}\n\nexport namespace GetBookRequest {\n    export type AsObject = {\n        isbn: number,\n    }\n}\n\nexport class GetBookViaAuthor extends jspb.Message {\n    getAuthor(): string;\n    setAuthor(value: string): GetBookViaAuthor;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): GetBookViaAuthor.AsObject;\n    static toObject(includeInstance: boolean, msg: GetBookViaAuthor): GetBookViaAuthor.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: GetBookViaAuthor, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): GetBookViaAuthor;\n    static deserializeBinaryFromReader(message: GetBookViaAuthor, reader: jspb.BinaryReader): GetBookViaAuthor;\n}\n\nexport namespace GetBookViaAuthor {\n    export type AsObject = {\n        author: string,\n    }\n}\n\nexport class BookStore extends jspb.Message {\n    getName(): string;\n    setName(value: string): BookStore;\n\n    getBooksMap(): jspb.Map\u003cnumber, string\u003e;\n    clearBooksMap(): void;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): BookStore.AsObject;\n    static toObject(includeInstance: boolean, msg: BookStore): BookStore.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: BookStore, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): BookStore;\n    static deserializeBinaryFromReader(message: BookStore, reader: jspb.BinaryReader): BookStore;\n}\n\nexport namespace BookStore {\n    export type AsObject = {\n        name: string,\n\n        booksMap: Array\u003c[number, string]\u003e,\n    }\n}\n\nexport class SpecialCases extends jspb.Message {\n    getNormal(): string;\n    setNormal(value: string): SpecialCases;\n    getDefault(): string;\n    setDefault(value: string): SpecialCases;\n    getFunction(): string;\n    setFunction(value: string): SpecialCases;\n    getVar(): string;\n    setVar(value: string): SpecialCases;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): SpecialCases.AsObject;\n    static toObject(includeInstance: boolean, msg: SpecialCases): SpecialCases.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: SpecialCases, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): SpecialCases;\n    static deserializeBinaryFromReader(message: SpecialCases, reader: jspb.BinaryReader): SpecialCases;\n}\n\nexport namespace SpecialCases {\n    export type AsObject = {\n        normal: string,\n        pb_default: string,\n        pb_function: string,\n        pb_var: string,\n    }\n}\n\nexport class OneOfSample extends jspb.Message {\n\n    hasA1(): boolean;\n    clearA1(): void;\n    getA1(): boolean;\n    setA1(value: boolean): OneOfSample;\n\n    hasB1(): boolean;\n    clearB1(): void;\n    getB1(): boolean;\n    setB1(value: boolean): OneOfSample;\n\n    hasA2(): boolean;\n    clearA2(): void;\n    getA2(): boolean;\n    setA2(value: boolean): OneOfSample;\n\n    hasB2(): boolean;\n    clearB2(): void;\n    getB2(): boolean;\n    setB2(value: boolean): OneOfSample;\n\n    getSinglewordCase(): OneOfSample.SinglewordCase;\n    getTwoWordsCase(): OneOfSample.TwoWordsCase;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): OneOfSample.AsObject;\n    static toObject(includeInstance: boolean, msg: OneOfSample): OneOfSample.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: OneOfSample, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): OneOfSample;\n    static deserializeBinaryFromReader(message: OneOfSample, reader: jspb.BinaryReader): OneOfSample;\n}\n\nexport namespace OneOfSample {\n    export type AsObject = {\n        a1: boolean,\n        b1: boolean,\n        a2: boolean,\n        b2: boolean,\n    }\n\n    export enum SinglewordCase {\n        SINGLEWORD_NOT_SET = 0,\n        A1 = 1,\n        B1 = 2,\n    }\n\n    export enum TwoWordsCase {\n        TWO_WORDS_NOT_SET = 0,\n        A_2 = 3,\n        B_2 = 4,\n    }\n\n}\n\nexport class ExtMsgString extends jspb.Message {\n    getExtension$(): string;\n    setExtension$(value: string): ExtMsgString;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): ExtMsgString.AsObject;\n    static toObject(includeInstance: boolean, msg: ExtMsgString): ExtMsgString.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: ExtMsgString, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): ExtMsgString;\n    static deserializeBinaryFromReader(message: ExtMsgString, reader: jspb.BinaryReader): ExtMsgString;\n}\n\nexport namespace ExtMsgString {\n    export type AsObject = {\n        extension: string,\n    }\n}\n\nexport class ExtMsgList extends jspb.Message {\n    clearExtensionList(): void;\n    getExtensionList(): Array\u003cstring\u003e;\n    setExtensionList(value: Array\u003cstring\u003e): ExtMsgList;\n    addExtension$(value: string, index?: number): string;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): ExtMsgList.AsObject;\n    static toObject(includeInstance: boolean, msg: ExtMsgList): ExtMsgList.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: ExtMsgList, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): ExtMsgList;\n    static deserializeBinaryFromReader(message: ExtMsgList, reader: jspb.BinaryReader): ExtMsgList;\n}\n\nexport namespace ExtMsgList {\n    export type AsObject = {\n        extensionList: Array\u003cstring\u003e,\n    }\n}\n\nexport class ExtMsgByte extends jspb.Message {\n    getExtension$(): Uint8Array | string;\n    getExtension_asU8(): Uint8Array;\n    getExtension_asB64(): string;\n    setExtension$(value: Uint8Array | string): ExtMsgByte;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): ExtMsgByte.AsObject;\n    static toObject(includeInstance: boolean, msg: ExtMsgByte): ExtMsgByte.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: ExtMsgByte, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): ExtMsgByte;\n    static deserializeBinaryFromReader(message: ExtMsgByte, reader: jspb.BinaryReader): ExtMsgByte;\n}\n\nexport namespace ExtMsgByte {\n    export type AsObject = {\n        extension: Uint8Array | string,\n    }\n}\n\nexport class ExtMsgByteList extends jspb.Message {\n    clearExtensionList(): void;\n    getExtensionList(): Array\u003cUint8Array | string\u003e;\n    getExtensionList_asU8(): Array\u003cUint8Array\u003e;\n    getExtensionList_asB64(): Array\u003cstring\u003e;\n    setExtensionList(value: Array\u003cUint8Array | string\u003e): ExtMsgByteList;\n    addExtension$(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): ExtMsgByteList.AsObject;\n    static toObject(includeInstance: boolean, msg: ExtMsgByteList): ExtMsgByteList.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: ExtMsgByteList, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): ExtMsgByteList;\n    static deserializeBinaryFromReader(message: ExtMsgByteList, reader: jspb.BinaryReader): ExtMsgByteList;\n}\n\nexport namespace ExtMsgByteList {\n    export type AsObject = {\n        extensionList: Array\u003cUint8Array | string\u003e,\n    }\n}\n\nexport class ExtMsgMap extends jspb.Message {\n\n    getExtensionMap(): jspb.Map\u003cstring, string\u003e;\n    clearExtensionMap(): void;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): ExtMsgMap.AsObject;\n    static toObject(includeInstance: boolean, msg: ExtMsgMap): ExtMsgMap.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: ExtMsgMap, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): ExtMsgMap;\n    static deserializeBinaryFromReader(message: ExtMsgMap, reader: jspb.BinaryReader): ExtMsgMap;\n}\n\nexport namespace ExtMsgMap {\n    export type AsObject = {\n\n        extensionMap: Array\u003c[string, string]\u003e,\n    }\n}\n\nexport class ExtMsgOneOf extends jspb.Message {\n\n    hasExtension$(): boolean;\n    clearExtension$(): void;\n    getExtension$(): string;\n    setExtension$(value: string): ExtMsgOneOf;\n\n    getExtCase(): ExtMsgOneOf.ExtCase;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): ExtMsgOneOf.AsObject;\n    static toObject(includeInstance: boolean, msg: ExtMsgOneOf): ExtMsgOneOf.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: ExtMsgOneOf, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): ExtMsgOneOf;\n    static deserializeBinaryFromReader(message: ExtMsgOneOf, reader: jspb.BinaryReader): ExtMsgOneOf;\n}\n\nexport namespace ExtMsgOneOf {\n    export type AsObject = {\n        extension: string,\n    }\n\n    export enum ExtCase {\n        EXT_NOT_SET = 0,\n        EXTENSION = 1,\n    }\n\n}\n\nexport class OptTest extends jspb.Message {\n\n    hasName(): boolean;\n    clearName(): void;\n    getName(): string | undefined;\n    setName(value: string): OptTest;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): OptTest.AsObject;\n    static toObject(includeInstance: boolean, msg: OptTest): OptTest.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo\u003cjspb.Message\u003e};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo\u003cjspb.Message\u003e};\n    static serializeBinaryToWriter(message: OptTest, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): OptTest;\n    static deserializeBinaryFromReader(message: OptTest, reader: jspb.BinaryReader): OptTest;\n}\n\nexport namespace OptTest {\n    export type AsObject = {\n        name?: string,\n    }\n}\n\nexport enum EnumSample {\n    UNKNOWN = 0,\n    STARTED = 1,\n    RUNNING = 1,\n    CASETEST = 2,\n    HOW_ABOUT_THIS = 3,\n    ALLLOWERCASE = 4,\n}\n```\n\n### examples/grpcjs/proto/book_grpc_pb.d.ts\n```typescript\n// package: com.book\n// file: book.proto\n\n/* tslint:disable */\n/* eslint-disable */\n\nimport * as grpc from \"@grpc/grpc-js\";\nimport * as book_pb from \"./book_pb\";\n\ninterface IBookServiceService extends grpc.ServiceDefinition\u003cgrpc.UntypedServiceImplementation\u003e {\n    getBook: IBookServiceService_IGetBook;\n    getBooksViaAuthor: IBookServiceService_IGetBooksViaAuthor;\n    getGreatestBook: IBookServiceService_IGetGreatestBook;\n    getBooks: IBookServiceService_IGetBooks;\n}\n\ninterface IBookServiceService_IGetBook extends grpc.MethodDefinition\u003cbook_pb.GetBookRequest, book_pb.Book\u003e {\n    path: \"/com.book.BookService/GetBook\";\n    requestStream: false;\n    responseStream: false;\n    requestSerialize: grpc.serialize\u003cbook_pb.GetBookRequest\u003e;\n    requestDeserialize: grpc.deserialize\u003cbook_pb.GetBookRequest\u003e;\n    responseSerialize: grpc.serialize\u003cbook_pb.Book\u003e;\n    responseDeserialize: grpc.deserialize\u003cbook_pb.Book\u003e;\n}\ninterface IBookServiceService_IGetBooksViaAuthor extends grpc.MethodDefinition\u003cbook_pb.GetBookViaAuthor, book_pb.Book\u003e {\n    path: \"/com.book.BookService/GetBooksViaAuthor\";\n    requestStream: false;\n    responseStream: true;\n    requestSerialize: grpc.serialize\u003cbook_pb.GetBookViaAuthor\u003e;\n    requestDeserialize: grpc.deserialize\u003cbook_pb.GetBookViaAuthor\u003e;\n    responseSerialize: grpc.serialize\u003cbook_pb.Book\u003e;\n    responseDeserialize: grpc.deserialize\u003cbook_pb.Book\u003e;\n}\ninterface IBookServiceService_IGetGreatestBook extends grpc.MethodDefinition\u003cbook_pb.GetBookRequest, book_pb.Book\u003e {\n    path: \"/com.book.BookService/GetGreatestBook\";\n    requestStream: true;\n    responseStream: false;\n    requestSerialize: grpc.serialize\u003cbook_pb.GetBookRequest\u003e;\n    requestDeserialize: grpc.deserialize\u003cbook_pb.GetBookRequest\u003e;\n    responseSerialize: grpc.serialize\u003cbook_pb.Book\u003e;\n    responseDeserialize: grpc.deserialize\u003cbook_pb.Book\u003e;\n}\ninterface IBookServiceService_IGetBooks extends grpc.MethodDefinition\u003cbook_pb.GetBookRequest, book_pb.Book\u003e {\n    path: \"/com.book.BookService/GetBooks\";\n    requestStream: true;\n    responseStream: true;\n    requestSerialize: grpc.serialize\u003cbook_pb.GetBookRequest\u003e;\n    requestDeserialize: grpc.deserialize\u003cbook_pb.GetBookRequest\u003e;\n    responseSerialize: grpc.serialize\u003cbook_pb.Book\u003e;\n    responseDeserialize: grpc.deserialize\u003cbook_pb.Book\u003e;\n}\n\nexport const BookServiceService: IBookServiceService;\n\nexport interface IBookServiceServer extends grpc.UntypedServiceImplementation {\n    getBook: grpc.handleUnaryCall\u003cbook_pb.GetBookRequest, book_pb.Book\u003e;\n    getBooksViaAuthor: grpc.handleServerStreamingCall\u003cbook_pb.GetBookViaAuthor, book_pb.Book\u003e;\n    getGreatestBook: grpc.handleClientStreamingCall\u003cbook_pb.GetBookRequest, book_pb.Book\u003e;\n    getBooks: grpc.handleBidiStreamingCall\u003cbook_pb.GetBookRequest, book_pb.Book\u003e;\n}\n\nexport interface IBookServiceClient {\n    getBook(request: book_pb.GetBookRequest, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientUnaryCall;\n    getBook(request: book_pb.GetBookRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientUnaryCall;\n    getBook(request: book_pb.GetBookRequest, metadata: grpc.Metadata, options: Partial\u003cgrpc.CallOptions\u003e, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientUnaryCall;\n    getBooksViaAuthor(request: book_pb.GetBookViaAuthor, options?: Partial\u003cgrpc.CallOptions\u003e): grpc.ClientReadableStream\u003cbook_pb.Book\u003e;\n    getBooksViaAuthor(request: book_pb.GetBookViaAuthor, metadata?: grpc.Metadata, options?: Partial\u003cgrpc.CallOptions\u003e): grpc.ClientReadableStream\u003cbook_pb.Book\u003e;\n    getGreatestBook(callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientWritableStream\u003cbook_pb.GetBookRequest\u003e;\n    getGreatestBook(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientWritableStream\u003cbook_pb.GetBookRequest\u003e;\n    getGreatestBook(options: Partial\u003cgrpc.CallOptions\u003e, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientWritableStream\u003cbook_pb.GetBookRequest\u003e;\n    getGreatestBook(metadata: grpc.Metadata, options: Partial\u003cgrpc.CallOptions\u003e, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientWritableStream\u003cbook_pb.GetBookRequest\u003e;\n    getBooks(): grpc.ClientDuplexStream\u003cbook_pb.GetBookRequest, book_pb.Book\u003e;\n    getBooks(options: Partial\u003cgrpc.CallOptions\u003e): grpc.ClientDuplexStream\u003cbook_pb.GetBookRequest, book_pb.Book\u003e;\n    getBooks(metadata: grpc.Metadata, options?: Partial\u003cgrpc.CallOptions\u003e): grpc.ClientDuplexStream\u003cbook_pb.GetBookRequest, book_pb.Book\u003e;\n}\n\nexport class BookServiceClient extends grpc.Client implements IBookServiceClient {\n    constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial\u003cgrpc.ClientOptions\u003e);\n    public getBook(request: book_pb.GetBookRequest, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientUnaryCall;\n    public getBook(request: book_pb.GetBookRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientUnaryCall;\n    public getBook(request: book_pb.GetBookRequest, metadata: grpc.Metadata, options: Partial\u003cgrpc.CallOptions\u003e, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientUnaryCall;\n    public getBooksViaAuthor(request: book_pb.GetBookViaAuthor, options?: Partial\u003cgrpc.CallOptions\u003e): grpc.ClientReadableStream\u003cbook_pb.Book\u003e;\n    public getBooksViaAuthor(request: book_pb.GetBookViaAuthor, metadata?: grpc.Metadata, options?: Partial\u003cgrpc.CallOptions\u003e): grpc.ClientReadableStream\u003cbook_pb.Book\u003e;\n    public getGreatestBook(callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientWritableStream\u003cbook_pb.GetBookRequest\u003e;\n    public getGreatestBook(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientWritableStream\u003cbook_pb.GetBookRequest\u003e;\n    public getGreatestBook(options: Partial\u003cgrpc.CallOptions\u003e, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientWritableStream\u003cbook_pb.GetBookRequest\u003e;\n    public getGreatestBook(metadata: grpc.Metadata, options: Partial\u003cgrpc.CallOptions\u003e, callback: (error: grpc.ServiceError | null, response: book_pb.Book) =\u003e void): grpc.ClientWritableStream\u003cbook_pb.GetBookRequest\u003e;\n    public getBooks(options?: Partial\u003cgrpc.CallOptions\u003e): grpc.ClientDuplexStream\u003cbook_pb.GetBookRequest, book_pb.Book\u003e;\n    public getBooks(metadata?: grpc.Metadata, options?: Partial\u003cgrpc.CallOptions\u003e): grpc.ClientDuplexStream\u003cbook_pb.GetBookRequest, book_pb.Book\u003e;\n}\n```\n\n## Changes\n### 5.3.2\nFix wrong `oneof` name issue. See: [Issue#113](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/113) and [PR#116](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/116).\n\n### 5.3.1\nUpdate doc and Add runnable example for magic generics class style server implementation. See [Issue#79](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/79#issuecomment-890109586) and [Issue#108](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/108) and [PR#109](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/109).\n\nUpdated doc could be found here: [@grpc/grpc-js server implementation signature issue](https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/v5.3.1/doc/server_impl_signature.md).\n\n### 5.3.0\nFix signature issue of `handleClientStreamingCall` exporting. See [PR#105](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/105).\n\nSince `@grpc/grpc-js@1.2.0` fixed the signature issue of `handleClientStreamingCall` exporting. It's no longer necessary to import it manually in `*_pb.d.ts` files like:\n\n```typescript\nimport {handleClientStreamingCall} from \"@grpc/grpc-js/build/src/server-call\";\n```\n\nUsers who are using versions lower than `@grpc/grpc-js@1.2.0` would be impacted, need to upgrade.\n\n### 5.2.2\nFix vulnerabilities. See: [PR#102](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/102).\n\n### 5.2.1\nRemove lib `handlebars-helpers`. [PR#98](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/98).\n\n### 5.2.0\nAdd support for proto3 `optional`. `grpc-tools` version `1.11.1` is `RQUIRED`. See: [Issue#88](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/88) and [PR#97](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/97).\n\nSome info:\n\n- google-protobuf changes: https://github.com/protocolbuffers/protobuf/blob/master/CHANGES.txt\n- google-protobuf releases: https://github.com/protocolbuffers/protobuf/releases\n- grpc-tools releases: https://github.com/grpc/grpc-node/releases\n\n### 5.1.3\nFix wrong publishing, 5.1.2 contains some temp compiled codes. See: [Issue#89](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/89).\n\n### 5.1.2\nFix `Extension` and `JsPbMessageId` issue, see: [Issue#84](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/84), and [PR#87](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/87).\n\n### 5.1.1\nAdd docs to explain previous breaking change a bit more. See: [PR#82](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/82).\n\n### 5.1.0\nFix server implementation signature issue of `grpc_js` side. See: [Issue#79](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/79).\n\nBreaking change, only `grpc_js` side would be affected.\n\nThe interface of service server now extends `grpc.UntypedServiceImplementation` (examples/src/grpcjs/proto/book_grpc_pb.d.ts).\n\n```typescript\n// from\nexport interface IBookServiceServer {}\n\n// to\nexport interface IBookServiceServer extends grpc.UntypedServiceImplementation {}\n```\n\nAnd the server implementation have to add a line of codes:\n\n```typescript\nclass ServerImpl implements IBookServiceServer {\n    [name: string]: grpc.UntypedHandleCall;\n    // others ...\n}\n```\n\nIf this line of code not added, there will be some error:\n\n```\nTS2420: Class 'ServerImpl' incorrectly implements interface 'IBookServiceServer'.\n  Index signature is missing in type 'ServerImpl'.\n```\n\nHave a look at: [Typescript: Index signature is missing in type](https://stackoverflow.com/questions/37006008/typescript-index-signature-is-missing-in-type).\n\nOr, you can switch the server implementation from `Class style` to `Object style`:\n\n```typescript\nconst ServerImpl: IBookServiceServer = {\n  // implementations\n}\n```\n\nObject style requires no additional statement, and can be appended with more attributes.\n\nAlso, please read this doc for more information: [@grpc/grpc-js server implementation signature issue](https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/v5.1.1/doc/server_impl_signature.md).\n\n### 5.0.1\nFix array.includes issue. See: [Issue#73](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/73), [Commit#1e4ae67](https://github.com/agreatfool/grpc_tools_node_protoc_ts/commit/1e4ae677d2f1f0066a21fe5e9dd48b10dd24f5af).\n\n### 5.0.0\nMigrating to option `grpc_js` from [grpc-tools@1.9.0](https://github.com/grpc/grpc-node/releases/tag/grpc-tools%401.9.0).\n\nTwo points:\n\n* Using option `grpc_js` in `grpc_tools_node_protoc ... --grpc_out=grpc_js:...`\n* Style of generated js codes looks like traditional `grpc_tools_node_protoc ...  --plugin=protoc-gen-grpc=which grpc_tools_node_protoc_plugin`\n\nDifference between grpc-tools version `1.8.1` and `1.9.0`, and also between `generate_package_definition` and `grpc_js` could be found here: [@grpc/grpc-js support @5.0.0](https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/v5.0.0/doc/grpcjs_support.md).\n\nUsers who are still using version 3.0.0 - 4.1.5 would not be affected. In version 5.0.0 options `generate_package_definition` and `grpc_js` are all available.\n\nThough, 5.0.0 is recommended for users who using grpc-tools@1.9.0 or over, don't forget to switch your option to `grpc_js`. And remember, if you switch the cli command option to `grpc_js`, you have to adjust your typescript implementation, see: [examples/src/grpcjs](https://github.com/agreatfool/grpc_tools_node_protoc_ts/tree/v5.0.0/examples/src/grpcjs).\n\nSee more details:\n\n* [PR#71](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/71)\n* [Broken ts imports after moving to grpc-js #70](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/70)\n* [Broken typescript exports after moving to @grpc/grpc-js#1600](https://github.com/grpc/grpc-node/issues/1600#issuecomment-705097639)\n\n### 4.1.5\nUse string literal type for path. See: [PR#69](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/69).\n\n### 4.1.4\nAdd `.npmignore` to shrink the size of npm package. See: [PR#65](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/65).\n\n### 4.1.3\nUpdate doc to solve issues like: [Issue#63](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/63).\n\n### 4.1.1 - 4.1.2\nUpdate grpc-js example codes. Fix vulnerabilities of example packages. Fix type of third param of Client class, see: [PR#62](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/62).\n\n### 4.1.0\nSwitch the type of `requestStream` \u0026 `responseStream` in file `*_grpc_pb.d.ts` from `boolean` to `true | false`. See: [PR#58](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/58).\n\n### 4.0.0\n[grpc-tools@1.9.0](https://github.com/grpc/grpc-node/releases/tag/grpc-tools%401.9.0) changes the generated js codes a lot. Current version is released to fix the setters issue, see: [PR#55](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/55). Note: This is a breaking change, if you are still using grpc-tools with version under `1.9.0`, you `DO NOT` need to upgrade, version `4.0.0` would break your codes.\n\nAlso, if you want to use chain setters, you have to upgrade the version of package `google-protobuf` to at least `3.10.0`. See the difference: [v3.9.0](https://github.com/protocolbuffers/protobuf/blob/v3.9.0/js/message.js#L1088) vs [v3.10.0](https://github.com/protocolbuffers/protobuf/blob/v3.10.0/js/message.js#L1109).\n\n### 3.0.0\n[@grpc/grpc-js](https://www.npmjs.com/package/@grpc/grpc-js) now is supported. See: [Issue#56](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/56). Users who still using [grpc](https://www.npmjs.com/package/grpc) would **NOT** be affected. More detailed information, please go to [@grpc/grpc-js support](https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/master/doc/grpcjs_support.md). Note: This upgrade requires grpc-tools version `1.8.1`.\n\n### 2.5.11\nFix vulnerabilities. See: [PR#54](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/54).\n\n### 2.5.10\nFix issue of oneof functionality. See: [PR#53](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/53).\n\n### 2.5.9\nFix vulnerabilities. See: [Issue#52](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/52).\n\n### 2.5.8\nFix vulnerabilities. See: [Issue#49](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/49).\n\n### 2.5.6 - 2.5.7\nAdd \"/* eslint-disable */\" in generated codes. See: [Issue#48](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/48). Also update package.json, to fix vulnerabilities.\n\n### 2.5.5\nFix extensions with reserved keywords. See: [PR#46](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/46).\n\n### 2.5.4\nCodes enhancement, use explicit model in coding. See: [PR#43](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/43). There is no functionality changes in this version update.\n\n### 2.5.3\nUpdate doc, add `About vulnerability` part.\n\n### 2.5.2\nFix vulnerability. See: [PR#41](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/41).\n\n### 2.5.1\nRemove unnecessary dependency `grpc` from package.json. See: [Issue#40](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/40).\n\n### 2.5.0\nAdd support for `[jstype = JS_STRING]` overrides. See: [PR#37](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/37).\n\n### 2.4.2\nUpdate grpc version in package.json of examples, to keep consistent.\nUpdate handlebars-helpers version to 0.10.0 to fix vulnerability version of randomatic.\n\n### 2.4.1\nUse gRPC-native ServiceError objects for errbacks in client methods. See: [PR#33](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/33).\n\n### 2.4.0\nFix(ClientReadableStream): Fixes return type generic argument of. See: [PR#30](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/30).\n\n### 2.3.2\nFix code generation error when there is no package defined in proto file. See: [PR#28](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/28).\n\n### 2.3.1\nFix an Enum case bug. See: [Issue#25](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/25) \u0026 [PR#26](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/26).\n\n### 2.3.0\nAdd a new server implementation interface signature, with this the server implementation could be verified. See: [Issue#22](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/22). And please also check the new example using this new feature: [link](https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/33946064e6d5134a32edffa0d1c0bce80055fe56/examples/src/server.ts#L11-L71).\n\n### 2.2.5\nFix issue of reversed JavaScript keyword code generation. See: [Issue#20](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/20) \u0026 [PR#21](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/21).\n\n### 2.2.4\nFix issue of conflicted I{$MethodName} name, see: [Issue#19](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/19).\n\n### 2.2.3\nFix definitions. [fix: add missing argument grpc.Client~CallOptions for requests](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/15/commits/ea3bff861201446346a2e6dfe511edc8f0cb6fdf)\n\n## About jstype options of protobuf\n\nJavaScript can safely handle numbers below `Number.MAX_SAFE_INTEGER`. Beyond the limit, it begins to overflow:\n\n```\n\u003e 90071992547409912131 + 1\n90071992547409920000\n```\n\nIf you are expecting large, 64bit fields consider using a `jstype` option to override the field type.\n\n```proto\n# example.proto\nmessage Example {\n  fixed64 id = 1 [jstype = JS_STRING];\n}\n```\n\n```typescript\n// example_pb.d.ts\nexport namespace Example {\n    export type AsObject = {\n        id: string\n    }\n}\n```\n\n## About vulnerability\nSince this tool is used to generate `typescript signature` for the codes generated from `grpc_tools_node_protoc`, the codes actually run with your application are from `grpc_tools_node_protoc`, not this tool. So it's still safe to be used even there are some vulnerabilities in it.\n\nIf you want your project to have no vulnerabilities detected, you could simply install this tool into global (out of your application project). And use it when you want to generate the typescript signature in development as usual.\n\n## About Docker\nSample below, just the idea, not perfect. Also some more info: [Issue#38](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/38#issuecomment-465475399).\n\n```Dockerfile\nFROM node:8.4.0\n\nRUN apt-get update \u0026\u0026 \\\n    apt-get -y install git unzip build-essential autoconf libtool\n\nRUN git clone https://github.com/google/protobuf.git \u0026\u0026 \\\n    cd protobuf \u0026\u0026 \\\n    ./autogen.sh \u0026\u0026 \\\n    ./configure \u0026\u0026 \\\n    make \u0026\u0026 \\\n    make install \u0026\u0026 \\\n    ldconfig \u0026\u0026 \\\n    make clean \u0026\u0026 \\\n    cd .. \u0026\u0026 \\\n    rm -r protobuf\n\nRUN git clone https://github.com/agreatfool/grpc_tools_node_protoc_ts.git grpc_protoc \u0026\u0026 \\\n    cd grpc_protoc \u0026\u0026 \\\n    npm i -g grpc-tools@1.6.6 --unsafe-perm \u0026\u0026 \\\n    npm i -g typescript --unsafe-perm \u0026\u0026 \\\n    npm i --unsafe-perm\n```\n```bash\n$ docker build -t node_protoc_plugin:0.1 .\n$ docker run --rm -i -t node_protoc_plugin:0.1 /bin/bash\n$ root@63249303596f:/# cd /grpc_protoc \u0026\u0026 ./bash/build.sh\n```\n\n## Environment\n```bash\nnode --version\n# v10.15.2\nnpm --version\n# 6.14.4\nprotoc --version\n# libprotoc 3.11.1\ngrpc_tools_node_protoc --version\n# libprotoc 3.11.4\nnpm list -g --depth=0 | grep grpc-tools\n# grpc-tools@1.9.1\ntsc --version\n# Version 3.7.3\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagreatfool%2Fgrpc_tools_node_protoc_ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagreatfool%2Fgrpc_tools_node_protoc_ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagreatfool%2Fgrpc_tools_node_protoc_ts/lists"}