Skip to content

5.5.0 regression - importHelpers do not work with moduleResolution: bundler #58325

Closed as not planned

Description

🔎 Search Terms

importHelpers
This syntax requires an imported helper but module 'tslib' cannot be found.
TS2354

🕗 Version & Regression Information

fails on 5.5.0-beta

  • This changed between versions 5.4.5 and 5.5.0

reproduces on 5.5.0-dev.20240425
can't be reproduced on playground as it seems to ignore importHelpers

⏯ Playground Link

https://github.com/Knagis/importHelpers-5.5.0

💻 Code

tsconfig.json:

{
    "compilerOptions": {
        "importHelpers": true,
        "target": "es2017",
        "module": "ESNext",
        "moduleResolution": "Bundler"
    },
    "include": [
        "./src/**/*",
    ],
}

src/index.ts

export function foo(args: any) {
    const { bar, ...extraArgs } = args;
    return extraArgs;
}

🙁 Actual behavior

node_modules\.bin\tsc -b
src/index.ts:2:21 - error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.

2     const { bar, ...extraArgs } = args;
                      ~~~~~~~~~


Found 1 error.

🙂 Expected behavior

Code compiles without errors.

Additional information about the issue

No response

Activity

  1. RyanCavanaugh commented on Apr 26, 2024

    @RyanCavanaugh
    Member

    Bisects to #57896

  2. added
    Needs Investigation
    on Apr 26, 2024
  3. andrewbranch commented on May 6, 2024

    @andrewbranch
    Member

    Duplicate of #57688

  4. removed
    Needs Investigation
    on May 6, 2024
  5. added
    Duplicate
    on May 6, 2024
  6. locked as resolved and limited conversation to collaborators on Oct 22, 2025
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

    Duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions