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

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

Open
Chealer opened this issue Aug 29, 2024 · 2 comments

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants