rpc-websocketserver
Version:
Simple rpc websocket server, wrapping the very popular 'ws' library. Register your RPCs with convenient decorators.
18 lines (17 loc) • 583 B
TypeScript
import 'reflect-metadata';
/**
* Symbol to be appended to function metadata
*/
export declare const PARAM_NAMES_KEY: unique symbol;
/**
* Decorator factory to register a function to a namespace
*
* @param methodName {string} - optional parameter to rename the function name to the provided string
*/
export declare function register(methodName?: string): Function;
/**
* Decorator factory to expose function parameter to registered method
*
* @param name {string} - associated name for param index
*/
export declare function param(name: string): Function;