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

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

Closed
Knagis opened this issue Apr 26, 2024 · 2 comments
Closed
Labels
Duplicate An existing issue was already created

Comments

@Knagis
Copy link
Contributor

Knagis commented Apr 26, 2024

🔎 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

@RyanCavanaugh
Copy link
Member

Bisects to #57896

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Apr 26, 2024
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 5.5.0 milestone Apr 26, 2024
@andrewbranch
Copy link
Member

Duplicate of #57688

@andrewbranch andrewbranch marked this as a duplicate of #57688 May 6, 2024
@andrewbranch andrewbranch closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
@andrewbranch andrewbranch removed their assignment May 6, 2024
@andrewbranch andrewbranch removed the Needs Investigation This issue needs a team member to investigate its status. label May 6, 2024
@andrewbranch andrewbranch removed this from the TypeScript 5.5.0 milestone May 6, 2024
@andrewbranch andrewbranch added the Duplicate An existing issue was already created label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants