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

fix: expose types in export map #22

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

43081j
Copy link
Contributor

@43081j 43081j commented Oct 17, 2023

When using nodenext resolution in typescript, the compiler will not fall back to top-level types and will instead expect there to be a sibling d.ts file or a types entry in the export.

This means currently errorstacks fails builds in modern typescript setups.

This fix introduces a types entry for the export, which points at the same definition file as the top-level types.

You can read more about that via this tool:
https://arethetypeswrong.github.io/?p=errorstacks%402.4.0

package.json Outdated Show resolved Hide resolved
When using `nodenext` resolution in typescript, the compiler will not
fall back to top-level `types` and will instead expect there to be a
sibling `d.ts` file or a `types` entry in the export.

This means currently errorstacks fails builds in modern typescript
setups.

This fix introduces a `types` entry for the export, which points at the
same definition file as the top-level `types`.
@43081j
Copy link
Contributor Author

43081j commented Oct 17, 2023

@marvinhagemeister have updated it 👍

Copy link
Owner

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, thanks 👍

@marvinhagemeister marvinhagemeister merged commit 60f86a1 into marvinhagemeister:main Oct 17, 2023
1 check passed
@43081j 43081j deleted the exports-types branch October 17, 2023 15:53
@43081j
Copy link
Contributor Author

43081j commented Oct 23, 2023

@marvinhagemeister any chance you could publish a new version? would be good to unblock some work i have depending on this 🙏

@koddsson
Copy link

koddsson commented Nov 2, 2023

@marvinhagemeister any chance you could publish a new version? would be good to unblock some work i have depending on this 🙏

+1 on this!

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

Successfully merging this pull request may close these issues.

3 participants