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

Export typescript types #4077

Closed
wants to merge 1 commit into from
Closed

Export typescript types #4077

wants to merge 1 commit into from

Conversation

chrmod
Copy link
Member

@chrmod chrmod commented Jul 10, 2024

This is another approach to export typescript type declarations in a way that can be consumed by every project out there.

Previous work based on @rollup/plugin-typescript` failed as type declarations were emitted with file extensions.

In this approach, we let typescript to emit both source and the declarations. But as typescript is incapable of changing the file extensions to cjs, we force module resolution by adding special package.json files in the build output.

This change forces us to use file extensions in all relative import, which may be a beneficial change as the ecosystem is moving to that standard anyways.

@chrmod chrmod mentioned this pull request Jul 11, 2024
@chrmod
Copy link
Member Author

chrmod commented Jul 12, 2024

closing in favour of #4079

@chrmod chrmod closed this Jul 12, 2024
@chrmod chrmod deleted the export-types branch October 17, 2024 10:39
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.

1 participant