Skip to content

Documentation: Add JSDoc to types.ts #103

@igeligel

Description

@igeligel

What should be changed?

  • An example is missing
  • Existing documentation needs to be extended
  • Something else, state below: JSDoc documentation is missing.

Description

For better usage of our props we can document them a bit more. This issue is quite easy and just involves documentation but also some understanding of how our components work.

A pull request for this issue should just add JSDoc comments for the src\types.ts file.

To explain from my own words what the things are used for:

  • IInOption: an option that will be shown on the left side of the selector in the component
  • IInOption.name: The name/label to show the option for. Could be "English", "German" or similar in the case of Google Translate
  • IInOption.active: Shows if the current option is active
  • IInOption.key: the key, mostly used because of: https://reactjs.org/docs/lists-and-keys.html
  • InOptions: An array of IInOption
  • IOutOption: The same as IInOption. An option that will be shown on the left side of the selector in the component. You can mention that another parameter was added to the interface.
  • IOutOption.activeClicked: Is a bit different than active because it shows a different color.
  • OutOptions: An array of IOutOption

Please rephrase these sentences so they makes sense. Resources that helped me to understand JSDoc comments:

Files involved

  • src\types.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomershacktoberfestHacktoberfest is a yearly developer festival where the participation in Open Source is appreciatedhelp wantedExtra attention is neededtrivial

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions