New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grpc-js & gpc-native-core: Types mismatch for ServerWritableStream #1581
Comments
@murgatroid99 while #1587 is a step in the right direction, the types are still incompatible. For example: interface IChatServer extends grpc.UntypedServiceImplementation {
join: grpc.handleServerStreamingCall<proto.ClientMessage, proto.ServerMessage>;
}
const chatServer: IChatServer = {
// type error when using the `grpc` package
join(call: grpc.ServerWritableStream<proto.ClientMessage, proto.ServerMessage>): void {
// implementation
}
}; I think it makes sense to align |
I think the definition should probably be something like |
That's a nice solution. Have added that change here: #1590 |
#1590 has been published in |
Problem description
I'm seeing a type difference in
grpc-js
andgpc-native-core
.grpc-node/packages/grpc-native-core/index.d.ts
Line 494 in ea36f75
grpc-node/packages/grpc-js/src/server-call.ts
Lines 90 to 93 in 5e0feb5
ServerWritableStream
requires one type argument withingrpc-native-core
and 2 withingrpc-js
.Reproduction steps
I'm playing around with the typescript generator within #1474 which generates following service definition:
Using this proto definition
..which is incompatible with the types found in
grpc-native-core
(thegrpc
npm package)The text was updated successfully, but these errors were encountered: