Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit ae057b1

Browse files
committed
Re-export remaining fetch types from undici, closes #124
1 parent 857d942 commit ae057b1

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

packages/core/src/standards/http.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ import {
5050
} from "./helpers";
5151
import { kContentLength } from "./streams";
5252

53+
export type {
54+
BodyInit,
55+
HeadersInit,
56+
RequestCache,
57+
RequestCredentials,
58+
RequestDestination,
59+
RequestMode,
60+
RequestRedirect,
61+
ResponseType,
62+
ResponseRedirectStatus,
63+
} from "undici";
64+
export { Headers } from "undici";
65+
5366
const inspect = Symbol.for("nodejs.util.inspect.custom");
5467
const nonEnumerable = Object.create(null);
5568
nonEnumerable.enumerable = false;

packages/core/src/standards/index.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,25 @@ export {
1818
_buildUnknownProtocolWarning,
1919
createCompatFetch,
2020
logResponse,
21+
// Re-exported from undici
22+
Headers,
23+
} from "./http";
24+
export type {
25+
RequestInfo,
26+
RequestInit,
27+
ResponseInit,
28+
HRTime,
29+
// Re-exported from undici
30+
BodyInit,
31+
HeadersInit,
32+
RequestCache,
33+
RequestCredentials,
34+
RequestDestination,
35+
RequestMode,
36+
RequestRedirect,
37+
ResponseType,
38+
ResponseRedirectStatus,
2139
} from "./http";
22-
export type { RequestInfo, RequestInit, ResponseInit, HRTime } from "./http";
2340
export { FixedLengthStream } from "./streams";
2441
export type { ArrayBufferViewConstructor } from "./streams";
2542
export * from "./timers";

0 commit comments

Comments
 (0)