refactor: convert JSDoc annotations to TypeScript types#619
refactor: convert JSDoc annotations to TypeScript types#619jeremyckahn wants to merge 1 commit intodevelopfrom
Conversation
Use a custom jscodeshift script to parse JSDoc blocks and convert `@param` and `@returns` tags into native TypeScript type annotations across the `src` directory. Verified with `npm test` and `tsc`. Co-authored-by: jeremyckahn <366330+jeremyckahn@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request adds TypeScript type annotations to the moneyString utility function. A review comment suggests renaming the function parameter from 'number' to a more descriptive name like 'amount' to avoid shadowing the built-in TypeScript type and improve code clarity.
| */ | ||
|
|
||
| export const moneyString = number => | ||
| export const moneyString = (number: number): string => |
There was a problem hiding this comment.
The parameter name number shadows the built-in number type keyword in TypeScript. While this is technically valid, it is generally considered poor practice as it can lead to confusion and potential shadowing issues. Consider using a more descriptive name such as amount or value to improve code clarity.
Implemented a custom
jscodeshifttransform script usingdoctrineto extract type information from JSDoc comments (@param,@returns) and inject native TypeScript type annotations into functions and variables across the project's source code. This acts as a reliable alternative tots-migrate(which was error-prone and skipping files) and successfully typed functions that were missing explicit typing, improving type coverage without introducing any regressions or test failures.PR created automatically by Jules for task 13995826070427797294 started by @jeremyckahn