TheVicky1 / TheVicky1/Pact_OS

[JSDoc] Add Return Type Annotations and Usage Example to Money Helper

Open Beginner friendly
#109 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:core beginner friendly bug community contributions-welcome difficulty:beginner difficulty:easy good first issue hacktoberfest help wanted jsdoc open-source up-for-grabs
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.