跳至主要內容
版本:23.11.1

連線。(建構函式) (Connection.(constructor))

建構 Connection 類別的新實例

簽章

class Connection {
constructor(
url: string,
transport: ConnectionTransport,
delay?: number,
timeout?: number,
rawErrors?: boolean,
);
}

參數

參數

類型

描述

url

字串

傳輸

連線傳輸 (ConnectionTransport)

延遲

數字

(可選)

逾時

數字

(可選)

原始錯誤

布林值

(可選)