Skip to content

[2.5.1][Regression] imported helper named '__decorate' does not exist in 'tslib' #203

Closed

Description

@AviVahl

See failures at: AviVahl/native-esm-lit#33
2.5.0 works. 2.5.1 broken.

Can be reproduced locally.

Project uses:

"module": "node16",
"moduleResolution": "node16",
"experimentalDecorators": true

Verified it's not a duplicate version or anything like that.

Activity

  1. jakebailey commented on May 18, 2023

    @jakebailey
    Member
  2. andrewbranch commented on May 18, 2023

    @andrewbranch
    Member

    I wonder if this code path in TS itself isn’t doing the work to resolve the export * re-export, assuming it can find the named export it wants directly on symbol.exports

  3. AviVahl commented on May 18, 2023

    @AviVahl
    Author

    Thanks for the quick fix. ❤️

  4. e6c31d commented on May 28, 2023

    @e6c31d

    Andrew Branch (@andrewbranch),

    I'm still seeing this issue with tslib 2.5.2. See this project to reproduce: https://github.com/e6c31d/tslib-issue

    Should I open a new issue or can this issue be re-opened?

  5. andrewbranch commented on May 30, 2023

    @andrewbranch
    Member

    Well, this is a bummer. It’s a TypeScript bug that’s going to prevent re-exports from working in tslib at all. Specifically, __classPrivateFieldGet, __classPrivateFieldSet, and __spreadArray are checked for arity, which will fail on re-exports since the necessary alias resolution call is missing. We’ll have to get a TS patch out ASAP (again), but I don’t know if this one is reasonably fixable from the tslib side.

  6. andrewbranch commented on Jun 1, 2023

    @andrewbranch
    Member

    This is fixed in TypeScript 5.1 (just published), and I’m working to get it into a 5.0 patch as well. If you’re affected by this and stuck on an older version of TypeScript, you’ll need to roll back to tslib@2.5.0.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions