Title: Support 'Promote JSDoc comment to type annotation' · Issue #2916 · microsoft/TypeScript · GitHub
Open Graph Title: Support 'Promote JSDoc comment to type annotation' · Issue #2916 · microsoft/TypeScript
X Title: Support 'Promote JSDoc comment to type annotation' · Issue #2916 · microsoft/TypeScript
Description: We should consider the feasibility of a simple editor command where existing JSDoc comments are automatically converted to TypeScript type annotations. This could be a massive benefit for easing migration from JavaScript to TypeScript bo...
Open Graph Description: We should consider the feasibility of a simple editor command where existing JSDoc comments are automatically converted to TypeScript type annotations. This could be a massive benefit for easing mi...
X Description: We should consider the feasibility of a simple editor command where existing JSDoc comments are automatically converted to TypeScript type annotations. This could be a massive benefit for easing mi...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/2916
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support 'Promote JSDoc comment to type annotation'","articleBody":"We should consider the feasibility of a simple editor command where existing JSDoc comments are automatically converted to TypeScript type annotations. This could be a massive benefit for easing migration from JavaScript to TypeScript both in terms of saving pain fixing 'errors' (ie places that need type annotations) and being able to immediately leverage TypeScript's biggest value prop.\n\nIn addition, this could be a great way to improve the .d.ts generation process. Imagine picking up a new JS library that doesn't have a .d.ts but is well documented with JSDoc comments. Despite the lack of a .d.ts on DefinitelyTyped you could simply use this new command to promote the JSDoc comments to type annotations, then run the file through tsc --declaration and in almost no time have a high quality .d.ts.\n\n---\n\n_Edit by @DanielRosenwasser_:\n- [x] Teach the parser how to parse full JSDoc format.\n- [ ] Emit JSDoc in `.js` files\n- [ ] Display a warning when users use a JSDoc type annotation instead of a TypeScript type annotation.\n- [ ] Support a tool/mode to generate a `.d.ts` from a `.js` file\n- [x] In the language service, JS doc could be used to infer types for `.js` files.\n","author":{"url":"https://github.com/danquirk","@type":"Person","name":"danquirk"},"datePublished":"2015-04-24T23:55:46Z","url":"https://github.com/microsoft/TypeScript/issues/2916"}
| 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:eb038297-41bf-e83e-0d29-d8d209043230 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 961A:33D4D9:3491:452F:6AFBB44D |
| html-safe-nonce | 3a7146d80ca4c1445fbc84d3553376759cd5205e3566a367ac69d06f35a619b9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjFBOjMzRDREOTozNDkxOjQ1MkY6NkFGQkI0NEQiLCJ2aXNpdG9yX2lkIjoiODAxOTI0MjI1NzQ0Nzg5MjA0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7c046122f3094387a3c8e43a0d101f24fddbf4afc35db7a1fbfdaee9ce823455 |
| hovercard-subject-tag | issue:70825337 |
| 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/2916/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7eaf2c831aafa2e7b6bbaa3c3ded7e1ff6adfbcfdc8679c994e264968c630477/microsoft/TypeScript/issues/2916 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7eaf2c831aafa2e7b6bbaa3c3ded7e1ff6adfbcfdc8679c994e264968c630477/microsoft/TypeScript/issues/2916 |
| og:image:alt | We should consider the feasibility of a simple editor command where existing JSDoc comments are automatically converted to TypeScript type annotations. This could be a massive benefit for easing mi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | danquirk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c |
| 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 | e4cce0e99cf61481a318ff12c2e8580153a6c7c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width