Skip to content

Commit 483bf1d

Browse files
authored
fix: export urllib types directly (#5128)
1 parent 65cbb9c commit 483bf1d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

index.d.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import {
1919
HttpClientResponse as HttpClientResponseOld,
2020
} from 'urllib';
2121
import {
22-
RequestURL,
23-
RequestOptions as RequestOptionsNext,
24-
HttpClientResponse as HttpClientResponseNext,
22+
RequestURL as HttpClientRequestURL,
23+
RequestOptions as HttpClientRequestOptions,
24+
HttpClientResponse,
2525
} from 'urllib-next';
2626
import {
2727
EggCoreBase,
@@ -60,10 +60,7 @@ declare module 'egg' {
6060
// return await app.httpclient.request(url, options);
6161
// }
6262
// ```
63-
export type HttpClientRequestURL = RequestURL;
64-
export type HttpClientRequestOptions = RequestOptionsNext;
65-
export type HttpClientResponse<T = any> = HttpClientResponseNext<T>;
66-
63+
export { HttpClientRequestURL, HttpClientRequestOptions, HttpClientResponse };
6764
// Compatible with both urllib@2 and urllib@3 RequestOptions to request
6865
export interface EggHttpClient extends EventEmitter {
6966
request<T = any>(url: HttpClientRequestURL): Promise<HttpClientResponseOld<T> | HttpClientResponse<T>>;

0 commit comments

Comments
 (0)