Skip to content

Poor builtin documentation (no JSDoc, including in TypeScript declaration files (index.d.ts)) #1798

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

Closed
Chealer opened this issue Aug 29, 2024 · 4 comments
Labels

Comments

@Chealer
Copy link

Chealer commented Aug 29, 2024

Documentation issue

The definition files of react-i18next are minimal, providing little (if any) documentation of the functions and interfaces they define. For example, as of 15.0.1, index.d.ts does not document its purpose, let alone what it returns. That is pretty well documented in the online documentation, but there is not even a link to that from the "header files".

Motivation

Make it easier to understand how applications using react-i18next are implemented.

@Chealer Chealer changed the title Poor function documentation Poor documentation in definition files (index.d.ts) Aug 29, 2024
@adrai
Copy link
Member

adrai commented Aug 29, 2024

Our documentation is the online documentation... we usually don't document in the type definition files, since i18next is a JavaScript and not a TypeScript project... but if you want, you can for sure provide a PR to extend the type definition files.

@Chealer
Copy link
Author

Chealer commented Aug 30, 2024

Our documentation is the online documentation... we usually don't document in the type definition files, since i18next is a JavaScript and not a TypeScript project...

That's basically what this reports, yes.
I see your point, but TypeScript bindings can be generated from JavaScript. Judging from src/useTranslation.js, the problem is that react-i18next has no JSDoc.

but if you want, you can for sure provide a PR to extend the type definition files.

Thanks, but provide what?

@Chealer Chealer changed the title Poor documentation in definition files (index.d.ts) Poor builtin documentation (no JSDoc, including in TypeScript declaration files (index.d.ts)) Aug 30, 2024
Copy link

stale bot commented Apr 26, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 26, 2025
@stale stale bot closed this as completed May 6, 2025
@Chealer
Copy link
Author

Chealer commented May 8, 2025

@Stale: what do you mean by marking "as stale" and closing this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants