Generates TypeScript definition files (.d.ts) from JavaScript code produced by grpc_tools_node_protoc (protoc plugin for Node.js gRPC). Current stable version 5.3.3 supports @grpc/grpc-js and requires grpc-tools >=1.9.0. The tool bridges gRPC protobuf code generation and TypeScript, providing type safety for gRPC clients and servers. It includes breaking changes across major versions, with v5 dropping support for older grpc-tools and @grpc/grpc-js versions. Compared to alternatives like @grpc/proto-loader, this package generates static type definitions rather than runtime dynamic types.
npm install grpc_tools_node_protoc_tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs required packages, generates JS and d.ts files from .proto, then uses the typed client in a TypeScript application.
Upgrade @grpc/grpc-js to >=1.2.0 and change imports to '@grpc/grpc-js'.
Upgrade grpc-tools to >=1.11.1.
Upgrade grpc-tools to >=1.9.0 and google-protobuf to >=3.10.0.
Update code if it relied on the incorrect stream type.
Replace 'grpc' with '@grpc/grpc-js' and update imports.
Install locally: npm install --save-dev grpc_tools_node_protoc_ts Or install globally: npm install -g grpc_tools_node_protoc_ts
Ensure grpc_tools_node_protoc generated JS files with --grpc_out=grpc_js and --js_out=import_style=commonjs,binary. Verify .proto service definition.
npm install @grpc/grpc-js
Set syntax = 'proto3'; in .proto and upgrade grpc-tools to >=1.11.1.