Skip to content

Commit b9d8368

Browse files
authored
fix: 🏷️ add allowH2 to BuildOptions (#2334)
* fix: 🏷️ add allowH2 to BuildOptions * test: ✅ update test
1 parent 06380f6 commit b9d8368

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

test/types/connector.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {ConnectionOptions, TLSSocket} from 'tls'
44
import {Socket} from 'net'
55
import {IpcNetConnectOpts, NetConnectOpts, TcpNetConnectOpts} from "net";
66

7-
const connector = buildConnector({ rejectUnauthorized: false })
7+
const connector = buildConnector({ rejectUnauthorized: false, allowH2: false })
88
expectAssignable<Client>(new Client('', {
99
connect (opts: buildConnector.Options, cb: buildConnector.Callback) {
1010
connector(opts, (...args) => {

types/connector.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ declare function buildConnector (options?: buildConnector.BuildOptions): buildCo
66

77
declare namespace buildConnector {
88
export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & {
9+
allowH2?: boolean;
910
maxCachedSessions?: number | null;
1011
socketPath?: string | null;
1112
timeout?: number | null;

0 commit comments

Comments
 (0)