Skip to content
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

Add ResponseType to ServerWritableStream #1590

Merged
merged 1 commit into from Oct 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/grpc-native-core/index.d.ts
Expand Up @@ -26,7 +26,7 @@ declare module "grpc" {

/* The Message interface is copied and slightly modified from @types/protobuf
* version 5.0.31, which was distributed under the following license:
*
*
* This project is licensed under the MIT license.
* Copyrights are respective of each contributor listed at the beginning of each definition file.
*
Expand Down Expand Up @@ -452,13 +452,13 @@ declare module "grpc" {
* User provided method to handle server streaming methods on the server.
*/
type handleServerStreamingCall<RequestType, ResponseType> =
(call: ServerWritableStream<RequestType>) => void;
(call: ServerWritableStream<RequestType, ResponseType>) => void;

/**
* A stream that the server can write to. Used for calls that are streaming
* from the server side.
*/
export class ServerWritableStream<RequestType> extends Writable {
export class ServerWritableStream<RequestType, ResponseType=unknown> extends Writable {
/**
* Indicates if the call has been cancelled
*/
Expand Down Expand Up @@ -491,7 +491,7 @@ declare module "grpc" {

/* This typo existed in previous versions of this file, so we provide this
* type alias for backwards compatibility. */
export type ServerWriteableStream<RequestType> = ServerWritableStream<RequestType>;
export type ServerWriteableStream<RequestType, ResponseType=unknown> = ServerWritableStream<RequestType, ResponseType>;

/**
* User provided method to handle bidirectional streaming calls on the server.
Expand Down