vitest
vitest copied to clipboard
add JSDoc to Vitest code
Clear and concise description of the problem
Vitest functions have little or no documentation in the code, making them difficult to use and adopt.
This is what the editor shows me:
and this is what I hope to see:
Suggested solution
add JSDoc to Vitest code
Alternative
I have to go to the documentation every time I'm not sure how to use a function :/
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
hey folks, I'd like to take a look on it to get familiarized with the project. would you guys have any clue? I've been searching for where jsdocs are added in expect packages but I could not find yet.
You can add jsdoc to the type definition here https://github.com/vitest-dev/vitest/blob/f969fb0f9f0247a7daa2afee8f70de25ea5e123f/packages/expect/src/types.ts#L116-L164
For example,
/**
* write something...
* @example
* expect("xxx").toEqual("xxx") // OK
*/
toEqual: <E>(expected: E) => void
Thanks a lot man!