language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Expose svelte2tsx component documentation

Open Tymek opened this issue 4 years ago • 2 comments

No currently available tool is able to generate complete component documentation from svelte file. There are many attempts listed here https://github.com/sveltejs/kit/issues/1979#issuecomment-1014259443. With this change it will be possible to access documentation of component and use svelte2tsx as a docgen tool.

Tymek avatar Jan 27 '22 16:01 Tymek

Most fitting format will probably be similar if not identical to what sveld is using. ParsedComponent interface in sveld/src/ComponentParser.ts#L98-L106

With this change using other parsers like sveld will not be necessary to output slots, generics etc.

I get it if this use case is better left for another package.

Tymek avatar Jan 31 '22 09:01 Tymek

@Tymek I think it would also be great to add examples on how to use it. Not neccessarily needed in this PR, but for the general public it still looks quiet abstract.

mrtnbroder avatar Feb 02 '22 13:02 mrtnbroder