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

Declaration files imports/exports from non-existing *.js files when outExtension is *.mjs #1182

Open
ComLock opened this issue Aug 13, 2024 · 1 comment

Comments

@ComLock
Copy link

ComLock commented Aug 13, 2024

If Options are as follows:

{
	dts: true,
	format: [ 'esm' ],
	outExtension() {
		return {
				js: '.mjs'
			}
		}
	}
}

The generated *.d.ts files will import/export from non-existant *.js files rather than the existing *.mjs files.

But even that would be weird/wrong, shouldn't it actually import/export from other *.d.ts files, not *.js files which doesn't even contain types?

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@ComLock
Copy link
Author

ComLock commented Aug 13, 2024

npx tsc --emitDeclarationOnly produces import/export without extensions.

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

No branches or pull requests

1 participant