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

Add declarationMap:true to tsconfig for correct ctrl-click go-to-source #357

Closed
wingedrhino opened this issue May 25, 2022 · 5 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@wingedrhino
Copy link

Currently, ctrl+click on a tinyhttp export from VS Code goes to the .d.ts file instead of going to the function source code. Adding "declarationMap": true to tsconfig.json would generate .js.map files. For example, take a look here https://github.com/wingedrhino/node-pipespawn/tree/master/dist

I'd love to add this to tinyhttp, but every other package that's been moved to its own dedicated repository would also need to be updated for this to be actually useful.

If you're happy to accept merge requests, I can start submitting them one at a time!

@wingedrhino wingedrhino added the enhancement New feature or request label May 25, 2022
@talentlessguy
Copy link
Member

I'm not sure tbh if it's worth increasing the package size for that but it's not that important for backend so let's go

@wingedrhino
Copy link
Author

This shouldn't increase RAM use! And depending on how the end-user configures their tsconfig.json (or webpack), it can also be stripped out of the final build.

Alight, sending a few pull requests your way this weekend!

@aarontravass
Copy link
Member

I'll take this up.

@aarontravass
Copy link
Member

Was looking at ts docs and I reckon we should turn on sourceMap and composite. sourceMap helps map the ts files and composite decreases type checking time since it references previous built files.

Related links
https://www.typescriptlang.org/tsconfig#sourceMap
https://www.typescriptlang.org/tsconfig#composite

aarontravass added a commit to aarontravass/tinyhttp that referenced this issue May 10, 2023
aarontravass added a commit to aarontravass/tinyhttp that referenced this issue May 10, 2023
talentlessguy pushed a commit that referenced this issue May 14, 2023
* feat: added declarationmap and composite in tsconfig #357

* feat: added sourcemap and alwaysstrict in tsconfig #357
@talentlessguy
Copy link
Member

talentlessguy commented May 14, 2023

thanks to @aarontravass it's now present in the monorepo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants