Add removeListener type and missing metadata event

This commit is contained in:
Yenru Chin 2020-06-27 17:31:47 +09:00 committed by Stanley Cheung
parent 74ea9b3b2a
commit a816d9c56e
1 changed files with 14 additions and 0 deletions

View File

@ -36,10 +36,24 @@ declare module "grpc-web" {
callback: (err: Error) => void): ClientReadableStream<Response>;
on (type: "status",
callback: (status: Status) => void): ClientReadableStream<Response>;
on (type: "metadata",
callback: (status: Metadata) => void): ClientReadableStream<Response>;
on (type: "data",
callback: (response: Response) => void): ClientReadableStream<Response>;
on (type: "end",
callback: () => void): ClientReadableStream<Response>;
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;
}