From 10e014f1cbbc59cd9f44830bcf3aff1ede5efb5f Mon Sep 17 00:00:00 2001 From: Yenru Chin Date: Sat, 27 Jun 2020 17:31:47 +0900 Subject: [PATCH] Add removeListener type and missing metadata event --- packages/grpc-web/index.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/grpc-web/index.d.ts b/packages/grpc-web/index.d.ts index ca737ebc..d0a06b4b 100644 --- a/packages/grpc-web/index.d.ts +++ b/packages/grpc-web/index.d.ts @@ -36,10 +36,24 @@ declare module "grpc-web" { callback: (err: Error) => void): ClientReadableStream; on (type: "status", callback: (status: Status) => void): ClientReadableStream; + on (type: "metadata", + callback: (status: Metadata) => void): ClientReadableStream; on (type: "data", callback: (response: Response) => void): ClientReadableStream; on (type: "end", callback: () => void): ClientReadableStream; + + removeListener (type: "error", + callback: (err: Error) => void): void; + removeListener (type: "status", + callback: (status: Status) => void): void; + removeListener (type: "metadata", + callback: (status: Metadata) => void): void; + removeListener (type: "data", + callback: (response: Response) => void): void; + removeListener (type: "end", + callback: () => void): void; + cancel (): void; }