Title: Preserve JSDocs in *.d.ts files when stripping comments · Issue #14619 · microsoft/TypeScript · GitHub
Open Graph Title: Preserve JSDocs in *.d.ts files when stripping comments · Issue #14619 · microsoft/TypeScript
X Title: Preserve JSDocs in *.d.ts files when stripping comments · Issue #14619 · microsoft/TypeScript
Description: Suggestion/Feature When using the switch removeComments it will strip out all comments including the ones you may consider useful to the end consumer such as JSDocs. I'd like to strip out any internal comments but preserve any JSDocs com...
Open Graph Description: Suggestion/Feature When using the switch removeComments it will strip out all comments including the ones you may consider useful to the end consumer such as JSDocs. I'd like to strip out any inter...
X Description: Suggestion/Feature When using the switch removeComments it will strip out all comments including the ones you may consider useful to the end consumer such as JSDocs. I'd like to strip out any i...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/14619
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Preserve JSDocs in *.d.ts files when stripping comments","articleBody":"# Suggestion/Feature\r\nWhen using the switch ```removeComments``` it will strip out all comments including the ones you may consider useful to the end consumer such as JSDocs. I'd like to strip out any internal comments but preserve any JSDocs comments. It seems that an option to preserve comments in types would be sufficient.\r\n\r\n## Existing functionality\r\n```json\r\n\"removeComments\": true,\r\n\"declaration\": true,\r\n```\r\nremoves all comments including those in *.d.ts files.\r\n\r\n## Suggested functionality\r\n```json\r\n\"removeComments\": true,\r\n\"declaration\": true,\r\n```\r\nI would think by default you'd want to include the JSDocs in your type defs, so this would remove all comments from the code, but retain any comments associated with the types ie JSDocs.\r\n\r\nIf however, there is a need to remove all comments then an additional switch may be required to serve that purpose:\r\n\r\n```json\r\n\"removeCommentsIncludingDeclarations\": true,\r\n\"declaration\": true,\r\n```\r\nWould produce the same result we have today.\r\n\r\n\r\n","author":{"url":"https://github.com/dotnetprofessional","@type":"Person","name":"dotnetprofessional"},"datePublished":"2017-03-13T04:25:20Z","url":"https://github.com/microsoft/TypeScript/issues/14619"}
| 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:bfb9cea6-1322-de72-4a12-927b652bd593 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E600:33444D:8A95C2:BA4CE5:6B00E3F9 |
| html-safe-nonce | ca75062ef146b3bfa0a2839ce1daf72df0877ee17b52870e966b401f7be311e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjAwOjMzNDQ0RDo4QTk1QzI6QkE0Q0U1OjZCMDBFM0Y5IiwidmlzaXRvcl9pZCI6IjEzMzQ0MjY2ODU4NjkxODkwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f79cd7e98d8b2874461d81e5f027bd5e9b77ea596e485fc3d47e325b08e57b20 |
| hovercard-subject-tag | issue:213670862 |
| 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/14619/issue_layout |
| twitter:image | https://opengraph.githubassets.com/858a7dcb3aba449a131de15c522931fa67e6ee5ccd50c56f0ad86865da515d64/microsoft/TypeScript/issues/14619 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/858a7dcb3aba449a131de15c522931fa67e6ee5ccd50c56f0ad86865da515d64/microsoft/TypeScript/issues/14619 |
| og:image:alt | Suggestion/Feature When using the switch removeComments it will strip out all comments including the ones you may consider useful to the end consumer such as JSDocs. I'd like to strip out any inter... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dotnetprofessional |
| 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