Skip to content

Commit e2f05c9

Browse files
committed
fix: add allowH2 define
1 parent a8de7bf commit e2f05c9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/lib/types.ts

+4
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ export interface HttpClientConfig {
8181
* @deprecated keep compatible with egg 3.x, no more used
8282
*/
8383
useHttpClientNext?: boolean;
84+
/**
85+
* Allow http2
86+
*/
87+
allowH2?: boolean;
8488
}
8589

8690
/**

test/index.test-d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ class AppBoot implements ILifecycleBoot {
146146
}
147147

148148
const app1 = {} as Application;
149+
150+
expectType<boolean>(app1.config.httpclient.allowH2!);
151+
149152
const appBoot = new AppBoot(app1);
150153
expectType<IBoot>(appBoot);
151154
expectType<ILifecycleBoot>(appBoot);

0 commit comments

Comments
 (0)