Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix JSDoc comments in datatype.ts #337

Merged
merged 14 commits into from Feb 2, 2022

Conversation

pkuczynski
Copy link
Member

Refs #203

@pkuczynski pkuczynski requested a review from a team as a code owner January 28, 2022 18:16
@pkuczynski pkuczynski added c: docs Improvements or additions to documentation c: chore PR that doesn't affect the runtime behavior labels Jan 28, 2022
@pkuczynski pkuczynski added this to the v6.0 - Project stability milestone Jan 28, 2022
src/datatype.ts Outdated Show resolved Hide resolved
@Shinigami92
Copy link
Member

@ST-DDT could you test out if your api docs generation script can handle this param syntax?

@ST-DDT
Copy link
Member

ST-DDT commented Jan 28, 2022

@Shinigami92 No it doesn't work.

The typedoc.json does not contain them either.

grafik

src/datatype.ts Outdated Show resolved Hide resolved
@pkuczynski
Copy link
Member Author

@Shinigami92 No it doesn't work.

There is an issue reported on typedoc and a PR with a fix: TypeStrong/typedoc#567

@ST-DDT
Copy link
Member

ST-DDT commented Jan 29, 2022

@pkuczynski AFAICT That issue/PR isn't going to be fixed/merged soon and even if it gets merged, it does not solve the problem for us. See TypeStrong/typedoc#1810 (review)

So maybe we should remove the [] for now?

Copy link
Member

@Shinigami92 Shinigami92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @pkuczynski, I also found out that the usage of square-brackets are not a good idea, cause it could be that JetBrains support it, but Microsoft doesn't support them in VSCode.
So we should try to find a solution to write docs for both worlds.

I also think you are mixing JSDoc and (what I call) TSDoc. It's kinda like JavaDoc vs KotlinDoc, they are similar but not the same.

So what I would suggest is something like

/**
 * @param options.min Lower bound for generated number. Defaults to `0`.
 */

@pkuczynski
Copy link
Member Author

I guess there is no other option than remove those defaults for now, and maybe add them at some point in the future when vscode and typedoc will support them. It's really a shame though, and it displays in the docs much nicer when the default value column is provided for a param vs when the information is embedded in the desc.

@pkuczynski
Copy link
Member Author

Done. Could you please re-review...?

Shinigami92
Shinigami92 previously approved these changes Feb 1, 2022
src/datatype.ts Outdated Show resolved Hide resolved
src/datatype.ts Outdated Show resolved Hide resolved
src/datatype.ts Outdated Show resolved Hide resolved
src/datatype.ts Outdated Show resolved Hide resolved
src/datatype.ts Outdated Show resolved Hide resolved
src/datatype.ts Outdated Show resolved Hide resolved
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
pkuczynski and others added 6 commits February 1, 2022 21:55
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
@ST-DDT ST-DDT requested a review from a team February 1, 2022 22:34
@ST-DDT ST-DDT merged commit 773bcec into faker-js:main Feb 2, 2022
@pkuczynski pkuczynski deleted the jsdoc-datatype branch February 2, 2022 17:51
demipel8 pushed a commit to demipel8/faker that referenced this pull request Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: chore PR that doesn't affect the runtime behavior c: docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants