-
-
Notifications
You must be signed in to change notification settings - Fork 688
Closed
Labels
TypesChanges related to the TypeScript definitionsChanges related to the TypeScript definitionsbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Bug Description
I'm trying to use the built-in retry interceptor, like in this docs example:
const { Client, interceptors } = require("undici");
const { retry } = interceptors;error TS2614: Module '"undici"' has no exported member 'interceptors'. Did you mean to use 'import interceptors from "undici"' instead?
import { Client, interceptors } from "undici";
~~~~~~~~~~~~
Following TypeScript's suggestion, this seems to work:
import { Client } from "undici";
import undici from "undici";
const { interceptors } = undici;
const { retry } = interceptors;That's a decent workaround for now, but it'd be great if the export could work as the doc describes.
Using undici v6.18.2, the latest as of this writing.
hargarpay
Metadata
Metadata
Assignees
Labels
TypesChanges related to the TypeScript definitionsChanges related to the TypeScript definitionsbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers