Open coolaj86 opened 2 years ago
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.
JSON.stringify(input, null, 2)
String
MyTypeStatusEnum
/** @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
/** * @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 */
Maybe any props that are all caps and assigned an array could be considered enums?
/** * @typedef {"IsPep"|"IsNotPep"} PepOption */ Mercury.POLITICALLY_EXPOSED_OPTIONS = ["IsPep", "IsNotPep"];
would be a really fun parser to write
It shouldn't require any parsing, just generating, but feel free to take it on.
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.
JSON.stringify(input, null, 2)
to prettify JSONString
MyTypeStatusEnum
?Example Output: JSON
should instead be
Example Output: Enums
Maybe any props that are all caps and assigned an array could be considered enums?