Rich-Harris / dts-buddy

WORK IN PROGRESS DO NOT USE
MIT License
317 stars 12 forks source link

fix: better way of preventing unintended exports #85

Closed dummdidumm closed 4 months ago

dummdidumm commented 4 months ago

https://github.com/sveltejs/svelte/issues/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