Skip to content

Commit dd2acb4

Browse files
committed
Clean up some duplicated types.
1 parent f58fc21 commit dd2acb4

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

libraries/rush-lib/src/utilities/WebClient.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@ import { Import, LegacyAdapters } from '@rushstack/node-core-library';
1616

1717
const createHttpsProxyAgent: typeof import('https-proxy-agent') = Import.lazy('https-proxy-agent', require);
1818

19-
/**
20-
* For use with {@link WebClient}.
21-
*/
22-
export interface IWebClientResponse {
19+
export interface IWebClientResponseBase {
2320
ok: boolean;
2421
status: number;
2522
statusText?: string;
2623
redirected: boolean;
2724
headers: Record<string, string | string[] | undefined>;
25+
}
26+
27+
/**
28+
* For use with {@link WebClient}.
29+
*/
30+
export interface IWebClientResponse extends IWebClientResponseBase {
2831
getTextAsync: () => Promise<string>;
2932
getJsonAsync: <TJson>() => Promise<TJson>;
3033
getBufferAsync: () => Promise<Buffer>;
@@ -34,12 +37,7 @@ export interface IWebClientResponse {
3437
* A response from {@link WebClient.fetchStreamAsync} that provides the response body as a
3538
* readable stream, avoiding buffering the entire response in memory.
3639
*/
37-
export interface IWebClientStreamResponse {
38-
ok: boolean;
39-
status: number;
40-
statusText?: string;
41-
redirected: boolean;
42-
headers: Record<string, string | string[] | undefined>;
40+
export interface IWebClientStreamResponse extends IWebClientResponseBase {
4341
stream: Readable;
4442
}
4543

0 commit comments

Comments
 (0)