grpc_tools_node_protoc_ts
Aim
Generate corresponding d.ts codes according to js codes generated by !grpc_tools_node_protoc
How to use
npm install grpc_tools_node_protoc_ts --save-dev
grpc_tools_node_protoc \
--js_out=import_style=commonjs,binary:./your_dest_dir \
--grpc_out=./your_dest_dir \
--plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` \
-I ./proto \
./your_proto_dir/*.proto
protoc \
--plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts \
--ts_out=./your_dest_dir \
-I ./proto \
./your_proto_dir/*.proto
Note
Environment
node --version
npm --version
protoc --version
grpc_tools_node_protoc --version
gRPC
Current gRPC(v1.3.7) has no official TypeScript definition, current d.ts file(typings/grpc.d.ts) is copied from an issue.
Please check: !#11020