jsonrpc-tsflexed_biceps为Node.js键入快速,轻量级的JSON RPC 2.0客户端
JSONRPC打字稿强烈地:flexed_biceps:用于Node.js的JSON RPC 2.0客户端经过全面测试,符合快速概述通过使用简单的接口声明事件,将方法名称映射到其参数,从而为您的服务获得强类型,快速和现代的Rpc客户端。安装npm i jsonrpc-ts用法首先,您需要定义方法,这可以通过创建方法名称和参数的接口来实现。 // we have a service that can do math, // and it has this methods interface MathService { // a method called sum that accepts 2 args of type number sum : [ number , number ] ; // methods can have named paramerter too. sub :
62.83KB
文件大小:
评论区