mirror of
https://github.com/dreamstarsky/runbin.git
synced 2026-05-15 22:33:09 +00:00
16 lines
585 B
TypeScript
16 lines
585 B
TypeScript
import { IJSONRPCNotification } from "./Request";
|
|
interface Arguments {
|
|
readonly method: string;
|
|
readonly params?: readonly unknown[] | object;
|
|
}
|
|
export declare type RequestArguments = Arguments;
|
|
export declare type NotificationArguments = Arguments;
|
|
export declare type JSONRPCMessage = RequestArguments | NotificationArguments;
|
|
export interface IClient {
|
|
request(args: RequestArguments): Promise<unknown>;
|
|
notify(args: NotificationArguments): Promise<unknown>;
|
|
close(): void;
|
|
onNotification(callback: (data: IJSONRPCNotification) => void): void;
|
|
}
|
|
export {};
|