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

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

Closed
AviVahl opened this issue May 18, 2023 · 6 comments · Fixed by #204, microsoft/TypeScript#54317 or microsoft/TypeScript#54450

Comments

@AviVahl
Copy link

AviVahl commented May 18, 2023

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.

@jakebailey
Copy link
Member

jakebailey commented May 18, 2023

Package diff: https://diff.intrinsic.com/tslib/2.5.0/2.5.1

I can only assume that things broke due to #179, #200, and/or #201?

@andrewbranch @weswigham

@andrewbranch
Copy link
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

@AviVahl
Copy link
Author

AviVahl commented May 18, 2023

Thanks for the quick fix. ❤️

@e6c31d
Copy link

e6c31d commented May 28, 2023

@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?

@andrewbranch
Copy link
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.

@andrewbranch
Copy link
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 [email protected].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants