Title: Support a 'declarationPath' option · Issue #6482 · microsoft/TypeScript · GitHub
Open Graph Title: Support a 'declarationPath' option · Issue #6482 · microsoft/TypeScript
X Title: Support a 'declarationPath' option · Issue #6482 · microsoft/TypeScript
Description: When declaration files are supposed to be stored in a separate output folder, deeper in the hierarchy, references in external .d.ts files break because TSC currently doesn't support this. I propose to provide an option for having declara...
Open Graph Description: When declaration files are supposed to be stored in a separate output folder, deeper in the hierarchy, references in external .d.ts files break because TSC currently doesn't support this. I propose...
X Description: When declaration files are supposed to be stored in a separate output folder, deeper in the hierarchy, references in external .d.ts files break because TSC currently doesn't support this. I pro...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/6482
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support a 'declarationPath' option","articleBody":"When declaration files are supposed to be stored in a separate output folder, deeper in the hierarchy, references in external `.d.ts` files break because `TSC` currently doesn't support this.\n\u003cbr/>\nI propose to provide an option for having declaration files stored in a separate folder, so `TSC` may amend the corresponding reference paths in the generated code files.\n\nIn particular, I'm proposing to replace the boolean `declaration` option with a `declarationPath` string option.\n\u003cbr/>\nThe path to be set here is suggested to be the relative path between the generated `.js` file and its corresponding `.d.ts` file. This would match the behaviour of `gulp-sourcemaps`:\n\n```\nTSC --declarationPath \"./headers/\" --target \"ES5\" --module \"commonjs\" --removeComments -noEmitOnError\n ------------------------------\n // relative to .js output folder\n```\n\n\u003cbr/>\n- `declarationPath: null` (default value) would not generate `.d.ts` files.\n- `declarationPath: \".\"` and `declarationPath: \"\"` would generate declaration files in the same folder as the generated `.js` files (standard case).\n- Any other value amends all references to `.d.ts` files pointing to (relative) locations within the project.\n\nSee [SetTrend/TS18N](https://github.com/SetTrend/TS18N) demo failing project for reference ...\n\n/cc #6465 \n\u003cbr/>\nYour thoughts?\n","author":{"url":"https://github.com/SetTrend","@type":"Person","name":"SetTrend"},"datePublished":"2016-01-14T14:51:42Z","url":"https://github.com/microsoft/TypeScript/issues/6482"}
| 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:d796700d-de21-f49e-018f-b45b5d1bfc77 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A5E2:E3C4F:1D7B5BE:258F1AA:6B01637C |
| html-safe-nonce | 956b789631cb8cf2805952bced088c03211163b35ae0b31da77bcc33f061823f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUUyOkUzQzRGOjFEN0I1QkU6MjU4RjFBQTo2QjAxNjM3QyIsInZpc2l0b3JfaWQiOiI2ODExNTMwMjU0NDc4MzA0MTI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a6ec6c5b50b27be98e7a5bd5729b4c360f320fa63fb158cbff76831396f92998 |
| hovercard-subject-tag | issue:126668998 |
| 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/6482/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d0e636df122fd4009b469eea097639bf3fca6cc881254c47bee4f41a471fc381/microsoft/TypeScript/issues/6482 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d0e636df122fd4009b469eea097639bf3fca6cc881254c47bee4f41a471fc381/microsoft/TypeScript/issues/6482 |
| og:image:alt | When declaration files are supposed to be stored in a separate output folder, deeper in the hierarchy, references in external .d.ts files break because TSC currently doesn't support this. I propose... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SetTrend |
| 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