react-i18next icon indicating copy to clipboard operation
react-i18next copied to clipboard

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

Open Chealer opened this issue 1 year ago • 2 comments

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 avatar Aug 29 '24 14:08 Chealer

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.

adrai avatar Aug 29 '24 15:08 adrai

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 avatar Aug 30 '24 11:08 Chealer

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[bot] avatar Apr 26 '25 02:04 stale[bot]

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

Chealer avatar May 08 '25 11:05 Chealer