BeyondCodeBootcamp / BeyondCodeBootcamp/jswithtypes.com

feature: /json-to-jsdoc

Ouverte
#1 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
good first issue hacktoberfest
Langage dominant
JavaScript
Étoiles
0
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

# The Big Idea

I'd like to host a standalone online tool like https://transform.tools/json-to-jsdoc, but that will break down intermediary types, and also handle enums.

- [ ] JavaScript conversion function (no frameworks or libraries)
- `JSON.stringify(input, null, 2)` to prettify JSON
- Traverses JSON to produce JSDoc
- Checkbox for "treat arrays as enums"
- Order types alphabetically
- "" is type `String`
- "a|b|c" creates a typedef `MyTypeStatusEnum` ?
- [ ] HTML Textareas
- CSS with variables (see MVP.css)

## Example Output: JSON

```js
/** @typedef {object} json
* @property {object} about
* @property {string} about.legalBusinessName
* @property {string} about.website
* @property {string} about.industry
* @property {string} about.countryOfOperation
* @property {string} about.description
* @property {string} about.operations
*/
```

should instead be

```js
/**
* @typedef MyType
* @prop {MyTypeAbout} about
*/

/**
* @typedef MyTypeAbout
* @prop {String} legalBusinessName
* @prop {String} website
* @prop {String} industry
* @prop {String} countryOfOperation
* @prop {String} description
* @prop {String} operations
*/
```

## Example Output: Enums

Maybe any props that are all caps and assigned an array could be considered enums?

```js
/**
* @typedef {"IsPep"|"IsNotPep"} PepOption
*/
Mercury.POLITICALLY_EXPOSED_OPTIONS = ["IsPep", "IsNotPep"];
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Aucun fichier, test ou point d’entrée n’est nommé. Commencez par localiser le code de conversion JavaScript et l’interface utilisateur textarea en HTML de l’outil autonome, puis comparez l’implémentation avec les types intermédiaires demandés, la gestion de enum, le classement alphabétique et les variables CSS ; l’achèvement signifie que les exemples JSON et enum listés produisent la sortie JSDoc attendue.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
css, html, javascript
Domaine
frontend
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.