ws-rmi
Version:
A Remote Method Invocation implementation written in JavaScript utilising the WebSocket protocol
16 lines (15 loc) • 717 B
TypeScript
import { RMIMessage } from "./RMIMessage";
import { RMIRemoteResultData } from "./RMIRemoteResult";
import { RMIRemoteErrorData } from "./RMIRemoteError";
export declare type RMIRemoteResponseData = RMIRemoteResultData | RMIRemoteErrorData;
/**
* Represents a response from the remote, either the result of a function invocation or an error that occurred
* during invocation.
*/
export declare type RMIRemoteResponse = RMIMessage<"RESPONSE_RESULT" | "RESPONSE_ERROR", RMIRemoteResponseData>;
/**
* Validates that the given response is an RMI Remote Response.
*
* @param response The response to validate.
*/
export declare const validateRMIRemoteResponse: (response: unknown) => response is RMIRemoteResponse;