2018-04-06 15:59:49 +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;
}