Argument of type 'Handler' is not assignable to parameter of type 'UntypedServiceImplementation' - grpc_tools_node_protoc_ts
Upgraded to the latest and started getting the error message above when using the addService call. Noticed that in your example you are ignoring the compilation issue with the ts-ignore directive, is this a known issue?
6 Answer:
Do you mean this one? https://github.com/agreatfool/grpctoolsnodeprotocts/issues/60
Seems not, could you share some sample codes or proto file? Also the versions you are using. Including the grpc_tools_node_protoc
.
Yes, it's a known issue. Let me have a look what I can do to solve | improve it.
@badsyntax https://github.com/agreatfool/grpctoolsnodeprotocts/commit/a2e4dfa738351541a1e74603c18c8525a9ec9d14
Thanks. Great to see this fixed. It looks like we now have Type parity across the popular tools:
- grpc-proto-loader
- ts-protoc-gen
- grpctoolsnodeprotocts
I'll update my example in https://github.com/badsyntax/grpc-js-types/tree/master/examples/grpctoolsnodeprotocts#issues-with-this-approach to show this latest change.
I'm not sure this is fixed. After updating to 5.1.0, I started getting TS compilation errors due to this change. VS Code expects the following to be in my implementation:
class MyServerImpl implements IMyServiceServer {
[name: string]: grpc.UntypedHandleCall; // <== This line is expected...
// But if I have properties / methods that are not RPC-handling like...
data: Foo = ...;
someOtherFunction() {...}
}
I get the following compiler error: Property 'data' of type 'Foo' is not assignable to string index type 'HandleCall
Read next
- Add Strings to Translation Function Call in _flag_list.html.erb - plots2
- --device cpu doesn't work - HyperGAN
- Add some way to know if a member has passed the server verification - JavaScript discord-api-docs
- [Feature request] Make zulip urls be opened by the zulp app. - TypeScript zulip-desktop
- failure to launch VSCodium; GdkPixbuf error - AppImageLauncher C++
- What does this mean? - spleeter
- electron can electron-triage bot reopen old issues if deemed appropriate rather than forcing us to create new issues? - Cplusplus
- kyverno [BUG] Deploying via helm with custom release name fails webhook config Go