diff --git a/test/types/connector.test-d.ts b/test/types/connector.test-d.ts index bbf07e1d396..923656974d1 100644 --- a/test/types/connector.test-d.ts +++ b/test/types/connector.test-d.ts @@ -4,7 +4,7 @@ import {ConnectionOptions, TLSSocket} from 'tls' import {Socket} from 'net' import {IpcNetConnectOpts, NetConnectOpts, TcpNetConnectOpts} from "net"; -const connector = buildConnector({ rejectUnauthorized: false }) +const connector = buildConnector({ rejectUnauthorized: false, allowH2: false }) expectAssignable(new Client('', { connect (opts: buildConnector.Options, cb: buildConnector.Callback) { connector(opts, (...args) => { diff --git a/types/connector.d.ts b/types/connector.d.ts index 847284a1f2b..bd924339eb3 100644 --- a/types/connector.d.ts +++ b/types/connector.d.ts @@ -6,6 +6,7 @@ declare function buildConnector (options?: buildConnector.BuildOptions): buildCo declare namespace buildConnector { export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { + allowH2?: boolean; maxCachedSessions?: number | null; socketPath?: string | null; timeout?: number | null;