跳至主要内容
版本: 22.5.0

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']>;
}

参数

参数类型描述
methodT
paramsProtocolMapping.Commands[T]['paramsType'][0](可选)
options命令选项(可选)

返回值

Promise<ProtocolMapping.Commands[T]['returnType']>