Title: Additional `removeDeclarationComments ` option for removing `comments` for JavaScript outputs but not declarations · Issue #61549 · microsoft/TypeScript · GitHub
Open Graph Title: Additional `removeDeclarationComments ` option for removing `comments` for JavaScript outputs but not declarations · Issue #61549 · microsoft/TypeScript
X Title: Additional `removeDeclarationComments ` option for removing `comments` for JavaScript outputs but not declarations · Issue #61549 · microsoft/TypeScript
Description: 🔍 Search Terms "removeComments" ✅ Viability Checklist This wouldn't be a breaking change in existing TypeScript/JavaScript code This wouldn't change the runtime behavior of existing JavaScript code This could be implemented without emitt...
Open Graph Description: 🔍 Search Terms "removeComments" ✅ Viability Checklist This wouldn't be a breaking change in existing TypeScript/JavaScript code This wouldn't change the runtime behavior of existing JavaScript code...
X Description: 🔍 Search Terms "removeComments" ✅ Viability Checklist This wouldn't be a breaking change in existing TypeScript/JavaScript code This wouldn't change the runtime behavior of existi...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/61549
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Additional `removeDeclarationComments ` option for removing `comments` for JavaScript outputs but not declarations","articleBody":"### 🔍 Search Terms\n\n\"removeComments\"\n\n### ✅ Viability Checklist\n\n- [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code\n- [x] This wouldn't change the runtime behavior of existing JavaScript code\n- [x] This could be implemented without emitting different JS based on the types of the expressions\n- [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)\n- [x] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types\n- [x] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals\n\n### ⭐ Suggestion\n\nAdd a new option `removeDeclarationComments: boolean`\n\n### 📃 Motivating Example\n\nI want to strip comments for JavaScript outputs but not declarations\n\n### 💻 Use Cases\n\n1. What do you want to use this for?\n\nComments for declarations are useful, for example `@deprecated` jsdoc\n\n2. What shortcomings exist with current approaches?\n\nIt doesn't make much sense to have both of them in JavaScript outputs and declarations\n\n3. What workarounds are you using in the meantime?\n\nI have to disable `removeComments` for now","author":{"url":"https://github.com/JounQin","@type":"Person","name":"JounQin"},"datePublished":"2025-04-07T15:44:29Z","url":"https://github.com/microsoft/TypeScript/issues/61549"}
| 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:9aaacf9d-9af2-61f4-2e58-573c3d3a560f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D172:2D2F2F:AF2D7C:E3F67B:6B00E79B |
| html-safe-nonce | f8d9e11d98e637127fa6b3e41251ec51855cc647ae12b8b82045df05286301c2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTcyOjJEMkYyRjpBRjJEN0M6RTNGNjdCOjZCMDBFNzlCIiwidmlzaXRvcl9pZCI6IjQ4NzM3NDE2OTMxNDY0MjUyNDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6f3a71257ce5335b4071819efe95e38dfa91042a67bdf8a7bf26546da80b3f64 |
| hovercard-subject-tag | issue:2977286911 |
| 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/61549/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0cd64559bc7cdfa7931c9c74baad2bb419c8095472daf96d076df892ecaacb7a/microsoft/TypeScript/issues/61549 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0cd64559bc7cdfa7931c9c74baad2bb419c8095472daf96d076df892ecaacb7a/microsoft/TypeScript/issues/61549 |
| og:image:alt | 🔍 Search Terms "removeComments" ✅ Viability Checklist This wouldn't be a breaking change in existing TypeScript/JavaScript code This wouldn't change the runtime behavior of existing JavaScript code... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JounQin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| 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 | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width