From 0f9f2b83b77710f2dc08c2a6bce1c78ba8d46760 Mon Sep 17 00:00:00 2001 From: Etienne Brodu Date: Fri, 10 Dec 2021 16:29:34 +0100 Subject: [PATCH] Export `Request` type (#1940) Co-authored-by: Sindre Sorhus Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com> --- documentation/typescript.md | 2 ++ source/index.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/documentation/typescript.md b/documentation/typescript.md index a3632dfda..b56738efc 100644 --- a/documentation/typescript.md +++ b/documentation/typescript.md @@ -40,6 +40,8 @@ Here's a list of types that Got exports: ### [`Response`](https://github.com/sindresorhus/got/blob/ae04c0e36cf3f5b2e356df7d48a5b19988f935a2/source/core/response.ts#L95) +### [`Request`](https://github.com/sindresorhus/got/blob/ecb05343dea3bd35933585a1ec5bcea01348d109/source/core/index.ts#L139) + ### [`RequestEvents`](https://github.com/sindresorhus/got/blob/ae04c0e36cf3f5b2e356df7d48a5b19988f935a2/source/core/index.ts#L108) ### [`InstanceDefaults`](https://github.com/sindresorhus/got/blob/ae04c0e36cf3f5b2e356df7d48a5b19988f935a2/source/types.ts#L17) diff --git a/source/index.ts b/source/index.ts index 497162260..cf6d927cd 100644 --- a/source/index.ts +++ b/source/index.ts @@ -16,6 +16,7 @@ export {got}; export {default as Options} from './core/options.js'; export * from './core/options.js'; export * from './core/response.js'; +export type {default as Request} from './core/index.js'; export * from './core/index.js'; export * from './core/errors.js'; export {Delays} from './core/timed-out.js';