The docs say
TypeScript declaration maps are mainly used to quickly jump to type definitions in the context of a monorepo (see source issue and official documentation).
They should not be included in a published NPM package and should not be confused with sourcemaps.
But this is 100% wrong.
Without declaration maps there is no way for a consumer of the package to be able to use the go to definition
in IDEs like VSCode. Without declaration maps, this will do to a d.ts file, which is already where the go to type definition
goes.
Without the declaration maps, the consumer has to easy way to find the actual code that is being run when using a function from an imported library.
I'm sure all of you here have been annoyed by that once, and THIS HERE IS THE REASON. Including declaration maps means the go to definition
will actually work.
I don't know if there is any way for TSUP to support this without just using TSC, but this advice here is absolutely incorrect. All libraries should include the declaration maps and TS source for our dev tools to work properly.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too