ng/projects/loafer/ng-rpc/src/lib/protocol/RPCClientCodec.ts
crusader bc3f80b726 ing
2018-05-24 12:04:38 +09:00

21 lines
500 B
TypeScript

import { RPCError } from './RPCError';
export interface RPCClientCodec {
request(method: string, args: any[], id: number): any;
response(res: any): RPCClientResponseCodec;
}
export interface RPCClientResponseCodec {
id(): number | undefined;
error(): RPCError | undefined;
result(): any | undefined;
isNotification(): boolean;
notification(): RPCClientNotificationCodec | undefined;
}
export interface RPCClientNotificationCodec {
method(): string;
params(): any | undefined;
}