Skip to content

Commit

Permalink
fix: 🏷️ add allowH2 to BuildOptions (#2334)
Browse files Browse the repository at this point in the history
* fix: 🏷️ add allowH2 to BuildOptions

* test: ✅ update test
  • Loading branch information
binsee authored Oct 11, 2023
1 parent 06380f6 commit b9d8368
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/types/connector.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Client>(new Client('', {
connect (opts: buildConnector.Options, cb: buildConnector.Callback) {
connector(opts, (...args) => {
Expand Down
1 change: 1 addition & 0 deletions types/connector.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b9d8368

Please sign in to comment.