[JSDoc] Add Return Type Annotations and Usage Example to Money Helper
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 7
- Avg merge
- 48m
- Merged PRs (30d)
- 41
Description
Target File
src/lib/money.ts
Estimated Time
5-10 minutes
Difficulty
Level 1 (Beginner)
Why This Matters
Public utility functions in domain engines should document return contracts and usage examples for new contributors.
Current Behavior
formatCentsToDollars in src/lib/money.ts contains basic JSDoc comments but lacks @returns contract annotations and code examples.
Requested Change
Add @returns {string} and a @example block illustrating integer-cents conversion (e.g. formatCentsToDollars(1250) // => $12.50).
Acceptance Criteria
- Function has complete JSDoc annotations with @param, @returns, and @example.
- Code passes npx tsc --noEmit.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open src/lib/money.ts and locate the formatCentsToDollars function and its existing JSDoc. Update the documentation with the requested @returns and @example details, then run npx tsc --noEmit; done means the JSDoc includes @param, @returns, and @example and TypeScript passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 95/100