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: better way of preventing unintended exports #85

Merged
merged 3 commits into from
Jul 2, 2024
Merged

Conversation

dummdidumm
Copy link
Collaborator

sveltejs/svelte#12202 revealed that TypeScript has a harder time tracing imports when they are indirectly exposed, e.g. function foo(): void; ... export { foo } instead of export function foo(): void;, which can lead to bugs down the line. Ultimately this is a TypeScript limitation but in the meantime adding a lone export {} along export function/const/etc statements has the same effect as #82

This reverts commit b9435de.
sveltejs/svelte#12202 revealed that TypeScript has a harder time tracing imports when they are indirectly exposed, e.g. `function foo(): void; ... export { foo }` instead of `export function foo(): void;`, which can lead to bugs down the line. Ultimately this is a TypeScript limitation but in the meantime adding a lone `export {}` along `export function/const/etc` statements has the same effect as #82
@Rich-Harris Rich-Harris merged commit 5867205 into main Jul 2, 2024
16 checks passed
@Rich-Harris Rich-Harris deleted the better-exports branch July 2, 2024 13:27
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.

2 participants