I generate grpc Typescript code with:
"proto": "npx grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc/client --grpc_out=./grpc/client --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` -I ./grpc/proto ./grpc/proto/*.proto && npx grpc_tools_node_protoc --plugin=protoc-gen-ts=`which protoc-gen-ts` --ts_out=./grpc/client -I ./grpc/proto ./grpc/proto/*.proto",
and hit the following error:
Services/SchoolService.ts:205:23 - error TS2345: Argument of type 'ISchoolService' is not assignable to parameter of type 'ServiceDefinition<UntypedServiceImplementation>'.
Index signature for type 'string' is missing in type 'ISchoolService'.
205 server.addService(SchoolService, new ServerImpl());
Environment
- OS name, version and architecture: [e.g. Linux Ubuntu 18.04 amd64] Ubuntu 24.04
- Node version [e.g. 8.10.0] 22.4.1
- Node installation method [e.g. nvm]
apt
- If applicable, compiler version [e.g. clang 3.8.0-2ubuntu4] g++ 13.2.0
- Package name and version [e.g. [email protected]]:
"grpc_tools_node_protoc_ts": "^5.3.3",
"@grpc/grpc-js": "^1.10.10",
"@grpc/proto-loader": "^0.7.13",
What do I miss?