JoshuaKGoldberg / JoshuaKGoldberg/TypeStat
🚀 Feature: Remove jsdoc type annotations when a type is added
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 47
- Avg merge
- 15h 55m
- Merged PRs (30d)
- 21
Description
### Bug Report Checklist
- [x] I have pulled the latest `main` branch of the repository.
- [x] I have [searched for related issues](https://github.com/JoshuaKGoldberg/TypeStat/issues?q=is%3Aissue) and found none that matched my issue.
### Overview
When adding types to JS code that has existing jsdoc comments providing types, it would be nice to cleanup (remove) the comment-based types (while obviously keeping any non-type-info portions of the doc comments).
In the screenshot below for instance, I would want the `@type {Ember/service}` comments to be stripped and for docs like `@param {Object} options` to have become `@param options`
### Additional Info
_No response_
Contributor guide
Research direction
Start by tracing the code that adds TypeScript types to JavaScript and handles existing JSDoc comments. Check how type information is represented for @type and @param annotations, then verify that type portions are removed while non-type documentation remains. Done means converted files no longer retain redundant JSDoc types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100