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
Generate Declaration Map #218
Comments
A declaration map is different from a source map, so it is not the same. |
Hm, can you elaborate what's the difference please? |
Source maps are "foo.js.map" files, and declaration maps are "foo.d.ts.map" files. They serve very different purposes. |
I mean, apart from that a source map is applied to the source code but the declaration map is applied to declaration files? |
|
Furthermore, these are handled by entirely separate compiler flags, such that you can turn on the following combinations:
|
Ok I got you. Since we are here talking about the tool that works with declaration files only I thought that I was clear enough that "source maps for declaration files" means "declaration maps", but it seems it is not. I'll rename that ticket because it meant exactly what you're saying. |
Greetings and thanks for the free tool.
I have a library written in TypeScript. It is consumed by users via npm (like you would expect).
In my library, I include both the source and the compiled output, along with the declaration map. That way, end-users can press F12 on the library functions to very-easily see what the resulting source code looks like. It's really good UX/DX!
Furthermore, the library has some internal functions that shouldn't be put into the auto-complete of end-users. Right now, I just have a crapload of @internal JSDoc comments, but this is pretty terrible. Thus, I would love to use the
dts-bundle-generator
tool to automatically purge any non-publically-exported functions from the generated .d.ts file. However, I can't do that without also breaking the declaration maps, becausedts-bundle-generator
does not seem to generate any declaration maps!Thus, I am stuck and can't use
dts-bundle-generator
at all. Please consider adding this feature, as I think my use-case is fairly ordinary, all things considered.The text was updated successfully, but these errors were encountered: