Connection.send() 方法
签名:
class Connection {
send<T extends keyof ProtocolMapping.Commands>(
method: T,
params?: ProtocolMapping.Commands[T]['paramsType'][0],
options?: CommandOptions
): Promise<ProtocolMapping.Commands[T]['returnType']>;
}
参数
参数 | 类型 | 描述 |
---|---|---|
method | T | |
params | ProtocolMapping.Commands[T]['paramsType'][0] | (可选) |
options | 命令选项 | (可选) |
返回值
Promise<ProtocolMapping.Commands[T]['returnType']>