Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interceptors does not have any exported type #2972

Closed
acommodari opened this issue Mar 18, 2024 · 6 comments · Fixed by #2967 or #3118
Closed

interceptors does not have any exported type #2972

acommodari opened this issue Mar 18, 2024 · 6 comments · Fixed by #2967 or #3118
Labels
bug Something isn't working

Comments

@acommodari
Copy link
Contributor

Bug Description

when you try to import interceptors in TS it complains

Reproducible By

import {interceptors} from "undici"

within a TypeScript project

Expected Behavior

You should be able to import interceptors and use redirect/retry in TS

Logs & Screenshots

Screenshot 2024-03-18 at 4 09 13 PM

Environment

macOS Ventura 13.2.1
node 20.11.1
undici 6.9.0

Additional context

@acommodari acommodari added the bug Something isn't working label Mar 18, 2024
@metcoder95
Copy link
Member

We already have a PR for fixing that: #2967

@metcoder95 metcoder95 linked a pull request Mar 19, 2024 that will close this issue
7 tasks
@filipforro
Copy link

I'm still unable to import interceptors and I'm currently on v6.13.0

npm list
image

package.json
image

image

@Uzlopak
Copy link
Contributor

Uzlopak commented Apr 15, 2024

Use Dispatcher and not Interceptors.

@everhardt
Copy link

@Uzlopak
Copy link
Contributor

Uzlopak commented Apr 16, 2024

Hmm. You are right.

module.exports.interceptors = {

I dont find the corresponding types.

@Uzlopak Uzlopak reopened this Apr 16, 2024
@metcoder95
Copy link
Member

This will be close with #3118

@metcoder95 metcoder95 linked a pull request Apr 16, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants