ciscoheat / sveltekit-superforms

Making SvelteKit forms a pleasure to use!
https://superforms.rocks
MIT License
2.11k stars 62 forks source link

JSDoc for the API #218

Open ciscoheat opened 1 year ago

ciscoheat commented 1 year ago

Something to work on!

tiptenbrink commented 1 year ago

If you want any help with this, I'm very much willing to! Have been using superforms in production for a few weeks now and it's been great! If you just show a few examples of how you would like it to look I could get to work on it.

ciscoheat commented 1 year ago

That would be much appreciated! I have made a jsdoc branch with an example for the setError method: https://github.com/ciscoheat/sveltekit-superforms/blob/jsdoc/src/lib/superValidate.ts#L78-L87

Edit: The jsdoc branch is retired, use main directly.

It's not a strict requirement by any means, I don't know how advanced the types can be (just copy/pasted from typescript), and not sure about return values either. You probably know jsdoc better, so feel free to do what you think is best. :)

The API page is a good priority order: https://superforms.rocks/api

ciscoheat commented 1 year ago

Merged jsdoc branch with main now, it was a bit outdated.

ciscoheat commented 1 year ago

The jsdoc branch keeps getting outdated, so it's best to use the main branch directly for documentation improvements.

webJose commented 3 weeks ago

I do a lot of JsDoc. I'm not claiming to be an expert, but I do like when libraries provide good Intellisense. See some of my work:

If you like the way I do it, let me know. I haven't used this package, though, so I'll have to read the docs first.

ciscoheat commented 2 weeks ago

Thank you for the offer, that would be great! I have just released a new version, so you can just clone the repo, make a jsdoc branch, and do as much as you like.