mi6 / mi6/ic-ui-kit

Addition of jsDocs comments to functions in utils/helpers.ts

Open
#1,753 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

guidance
Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

Adding JSDoc comments to functions `helpers.ts` file would assist developers by:

- Understanding Functionality: JSDoc comments provide a clear, concise description of what each function does, making it easier for developers to understand the purpose of a function without having to read and understand the entire function's code.

- Parameter Clarification: JSDoc comments specify the type and purpose of each parameter a function accepts, reducing ambiguity and potential misuse of the function.

- Return Values: They explain what a function returns, providing clarity on what to expect when the function is called.

- Error Handling: If a function throws an error under certain conditions, this can be documented in the JSDoc comments, helping developers handle potential errors appropriately.

- Code Navigation: By categorizing functions using JSDoc comments, developers can quickly navigate to the functions they need.

- Autocompletion and Hover Information: Many IDEs use JSDoc comments to provide autocompletion and information on hover for functions, making it easier for developers to write correct code.

- Documentation Generation: JSDoc comments can be used by documentation generators to automatically create a full set of documentation for the codebase, providing a valuable resource for developers.

An example of the first two functions in the file, updated with jsdocs:
![image](https://github.com/mi6/ic-ui-kit/assets/122624946/af6ee297-1362-4e07-a9c7-7f57b4c1a5b3)

While a large undertaking this work could lead to categorised documentation to help a developer locate (and therefore much more likely *use*) a helper function quicker.

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

Start by reviewing utils/helpers.ts and the JSDoc example for its first two functions. Inspect the remaining helper functions and document their purpose, parameters, return values, and relevant errors consistently. The work is done when all functions in the file have useful JSDoc comments.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.