Page MenuHomePhabricator

D9671.id32602.diff
No OneTemporary

D9671.id32602.diff

diff --git a/web/flow-typed/npm/grpc-web_v1.x.x.js b/web/flow-typed/npm/grpc-web_v1.x.x.js
--- a/web/flow-typed/npm/grpc-web_v1.x.x.js
+++ b/web/flow-typed/npm/grpc-web_v1.x.x.js
@@ -3,7 +3,7 @@
declare module 'grpc-web' {
- declare export type Metadata = { +[s: string]: string };
+ declare export type Metadata = { [s: string]: string };
declare export type StatusCode =
| 0 // OK
@@ -30,6 +30,41 @@
+metadata?: Metadata,
};
+ declare export class UnaryInterceptor<REQ, RESP> {
+ intercept(
+ request: Request<REQ, RESP>,
+ invoker: (request: Request<REQ, RESP>) => Promise<UnaryResponse<REQ, RESP>>
+ ): Promise<UnaryResponse<REQ, RESP>>;
+ }
+
+ declare export class Request<REQ, RESP> {
+ getRequestMessage(): REQ;
+ getMethodDescriptor(): MethodDescriptor<REQ, RESP>;
+ getMetadata(): Metadata;
+ getCallOptions(): CallOptions;
+ }
+
+ declare export class UnaryResponse<REQ, RESP> {
+ getResponseMessage(): RESP;
+ getMetadata(): Metadata;
+ getMethodDescriptor(): MethodDescriptor<REQ, RESP>;
+ getStatus(): Status;
+ }
+
+ declare export class CallOptions {
+ constructor(options: { [index: string]: any; }): void;
+ }
+
+ declare export class MethodDescriptor<REQ, RESP> {
+ constructor(name: string,
+ methodType: string,
+ requestType: (...args: mixed[]) => REQ,
+ responseType: (...args: mixed[]) => RESP,
+ requestSerializeFn: any,
+ responseDeserializeFn: any): void;
+ getName(): string;
+ }
+
declare export class RpcError extends Error {
constructor(code: StatusCode, message: string, metadata: Metadata): void;
code: StatusCode;

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 2, 9:46 PM (20 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2609013
Default Alt Text
D9671.id32602.diff (1 KB)

Event Timeline