Title: .d.ts source map allowing go to def to jump to source directly · Issue #14479 · microsoft/TypeScript · GitHub
Open Graph Title: .d.ts source map allowing go to def to jump to source directly · Issue #14479 · microsoft/TypeScript
X Title: .d.ts source map allowing go to def to jump to source directly · Issue #14479 · microsoft/TypeScript
Description: I know it has been asked and discussed before, but I couldn't find an explanation why you recommend to export only the type definitions when publishing an npm package. As a consumer of an npm package it is quite annoying to end up in d.t...
Open Graph Description: I know it has been asked and discussed before, but I couldn't find an explanation why you recommend to export only the type definitions when publishing an npm package. As a consumer of an npm packa...
X Description: I know it has been asked and discussed before, but I couldn't find an explanation why you recommend to export only the type definitions when publishing an npm package. As a consumer of an npm p...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/14479
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":" .d.ts source map allowing go to def to jump to source directly ","articleBody":"I know it has been asked and discussed before, but I couldn't find an explanation why you recommend to export only the type definitions when publishing an npm package.\r\n\r\nAs a consumer of an npm package it is quite annoying to end up in d.ts files when browsing code. Especially because I have to switch to the generate, down-leveled JS code to read the actual implementation. It is not only much less readable but also no longer well supported by my editor (no types).\r\n\r\nI understand that the tsconfig is important and that one doesn't want to recompile typescript code from npm packages, but the tools should really show the original source instead of the generated code.\r\n\r\nI am working on a monorepo project with a bunch of local npm packages with references. We use synthetic links (learna) and in `package.json`we point to `src/index.ts` instead of the usual `lib/index.d.ts`. As a result I can nicely navigate between the local packages and never end up in generated files. With vscode that is, not so much with webstorm... \r\nSo at least in our context it seem to be an improvement.\r\n\r\nCould you explain what problems this could cause and why you generally seem to recommend not to it like this?\r\n\r\n","author":{"url":"https://github.com/svenefftinge","@type":"Person","name":"svenefftinge"},"datePublished":"2017-03-06T07:09:42Z","url":"https://github.com/microsoft/TypeScript/issues/14479"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d1ffda6a-d51f-851b-d569-c98d415a7151 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E3EC:19F84C:2BFCD76:37EB321:6B019C89 |
| html-safe-nonce | 62b3fa63892f49725b0a152d4fdd7cb54d7cd5f3bacec9e89ae3a5dced3ec4f3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0VDOjE5Rjg0QzoyQkZDRDc2OjM3RUIzMjE6NkIwMTlDODkiLCJ2aXNpdG9yX2lkIjoiNzExOTA0MDE3NjE4MTA1ODY5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 915b7803b6e0816fba733a60e992fc9e0ff8181c3d8a4fb046d1802c70d38e6f |
| hovercard-subject-tag | issue:212040688 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/14479/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ade8d99bc37f75e76735b5eeebe12dcd6b571748c2342724d1df16939405bc4b/microsoft/TypeScript/issues/14479 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ade8d99bc37f75e76735b5eeebe12dcd6b571748c2342724d1df16939405bc4b/microsoft/TypeScript/issues/14479 |
| og:image:alt | I know it has been asked and discussed before, but I couldn't find an explanation why you recommend to export only the type definitions when publishing an npm package. As a consumer of an npm packa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | svenefftinge |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width