Skip to content

interceptors does not have any exported type #2972

Description

@acommodari

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

Activity

  1. metcoder95 commented on Mar 19, 2024

    @metcoder95
    Member

    We already have a PR for fixing that: #2967

  2. filipforro commented on Apr 15, 2024

    @filipforro

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

    npm list
    image

    package.json
    image

    image

  3. Uzlopak commented on Apr 15, 2024

    @Uzlopak
    Contributor

    Use Dispatcher and not Interceptors.

  4. everhardt commented on Apr 16, 2024

    @everhardt
  5. Uzlopak commented on Apr 16, 2024

    @Uzlopak
    Contributor

    Hmm. You are right.

    module.exports.interceptors = {

    I dont find the corresponding types.

  6. metcoder95 commented on Apr 16, 2024

    @metcoder95
    Member

    This will be close with #3118

  7. linked a pull request that will close this issuefeat: dump interceptor #3118on Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions