-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Incorrect ESM types #2482
Comments
Pretty good resource on ESM related requirements |
I went down a bit of an ESM rabbit hole earlier with #2567 so I'll have a dig here... |
Just done a new check on arethetypeswrong and we have resolved some problems, only the masqueraded ESM now so going to update the description. |
There is a CLI utility for testing the packages locally. I think the following PR might be helpful. I wouldn't linger too long upon this one, as no end-consumers have brought this up and I remember this one being a rabbit hole :) CurrentlyFrom what I remember - the issue with our distribution is that we share the types between both ESM and CJS: └─ dist
├── index.d.ts
├── index.d.ts.map
├── index.js
├── index.js.map
├── index.mjs
└── index.mjs.map ExpectedSo then the types aren't shared between them. └─ dist
├─ cjs
├─ index.d.ts
├─ index.d.ts.map
├─ index.cjs
└─ index.cjs.map
└─ mjs
├─ index.d.ts
├─ index.d.ts.map
├─ index.mjs
└─ index.mjs.map |
Ty, I will check those out, I think I am reading something similar. But agreed, I won't lose too much time on it. |
Okay so for this as @petertonysmith94 mentions we need to separate our distribution files between CJS and ESM. The expected way for this though is to create a I'm going to close this for now as we haven't had any reports since #1776 and our |
As part of #1776, we fixed the runtime issues that were being thrown for ESM based packages. However, the side note of incorrect types as specified by
AreTheTypeWrong
.The text was updated successfully, but these errors were encountered: