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

Co-locating .d.ts files and .ts source files results in TypeScript loading the .ts file instead of .d.ts in some cases #462

Closed
lucacasonato opened this issue Apr 29, 2024 · 0 comments · Fixed by #463
Labels
bug Something isn't working

Comments

@lucacasonato
Copy link
Member

lucacasonato commented Apr 29, 2024

In https://npm.jsr.io/~/8/@jsr/std__fs/0.223.0.tgz, a relative import to ./_create_walk_entry.d.ts is resolved to _create_walk_entry.ts instead by tsc: microsoft/TypeScript#58353

To work around this, we should emit all .js and d.ts files into a separate folder.

@lucacasonato lucacasonato added the bug Something isn't working label Apr 29, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 30, 2024
Fixes #462 

To make this work, also bans publishing packages containing a top level
folder called `_dist`.

Also we now do not reference `.d.ts` files from other `.d.ts` files
using the `.d.ts` extension, because otherwise tsc gets upset. So we
instead use `.js` (even if the file does not exist!)

Also we emit source maps into separate files, because TSC doesn't
understand embedded source maps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant