@syncable/core
Version:
6 lines (5 loc) • 433 B
TypeScript
import { IRPCDefinition } from './rpc-definition';
import { RPCPeer } from './rpc-peer';
export declare type RPCMethod<TDefinition extends IRPCDefinition> = (...args: TDefinition['args']) => Promise<TDefinition['return']> | TDefinition['return'];
export declare type RPCMethodDecorator = (target: RPCPeer, name: string, descriptor: TypedPropertyDescriptor<Function>) => void;
export declare function RPCMethod(): RPCMethodDecorator;