The Wayback Machine - https://web.archive.org/web/20220408192315/https://github.com/sveltejs/svelte/issues/7230
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

more jsdoc documentation for runtime parts #7230

Open
ehsan2003 opened this issue Feb 7, 2022 · 7 comments
Open

more jsdoc documentation for runtime parts #7230

ehsan2003 opened this issue Feb 7, 2022 · 7 comments
Labels
docs feature request good first issue

Comments

@ehsan2003
Copy link

@ehsan2003 ehsan2003 commented Feb 7, 2022

Describe the problem

the low level documentation (https://svelte.dev/docs) is not really easy to use ( and incomplete in some cases)
I think if the runtime function contain JSDOC it will help a lot and give the developers an easier way to discover api documentation

additionally it is possible to replace the https://svelte.dev/docs with the generated docs ( with some thing like https://typedoc.org/ )

I am not sure but it would also make svelte maintainers life easier because keeping the docs with code might be a pain 🤷‍♂️

Describe the proposed solution

add JSDOC for runtime functions
It wont take too much of time because text already exists in svelte.dev/docs

Alternatives considered

I have no idea about alternatives :)

Importance

would make my life easier

@bluwy bluwy added docs feature request good first issue labels Feb 8, 2022
@bluwy
Copy link
Member

@bluwy bluwy commented Feb 8, 2022

I think it is a good addition, though it would bear more maintenance work to make sure docs are updated in both places. Still would be better for the end-users though.

@ehsan2003
Copy link
Author

@ehsan2003 ehsan2003 commented Feb 8, 2022

I think it is a good addition, though it would bear more maintenance work to make sure docs are updated in both places. Still would be better for the end-users though.

typedoc could generate json output and it is possible to convert that into the existing markdown format so the use experience remains the same.

@ehsan2003
Copy link
Author

@ehsan2003 ehsan2003 commented Feb 8, 2022

currently working on a PR

@bluwy
Copy link
Member

@bluwy bluwy commented Feb 8, 2022

typedoc could generate json output and it is possible to convert that into the existing markdown format so the use experience remains the same.

We had talked about this in the past and concluded that the typedocs style isn't really user-friendly. I think for now we can stick with the hand-crafted docs, and update the jsdoc in-code only.

Also, I think having the jsdoc link back the the Svelte docs might be useful too, if you're already working on it 😅

@Prinzhorn
Copy link
Contributor

@Prinzhorn Prinzhorn commented Feb 8, 2022

concluded that the typedocs style isn't really user-friendly

I absolutely agree. There is a difference between documentation and an auto-generated API reference. To me these are two separate things (I unfortunately have to work with https://microsoft.github.io/monaco-editor/api/index.html regularly, so 👎 on having only TypeDocs)

@ehsan2003
Copy link
Author

@ehsan2003 ehsan2003 commented Feb 8, 2022

It wont be like that

It is possible to generate exactly the same dicumentation based on jsdoc

I am actually just coping docs markdown into jsdoc

And then I will use typedoc to extract them from jsdoc and then create the documentation which will be the same as current docs !

@ehsan2003
Copy link
Author

@ehsan2003 ehsan2003 commented Feb 9, 2022

oh now I finally found out that its not possible to completely generate the same result 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs feature request good first issue
Projects
None yet
Development

No branches or pull requests

3 participants