carbon-design-system / sveld

Generate TypeScript definitions for your Svelte components
https://sveld.onrender.com
Apache License 2.0
408 stars 21 forks source link

Grabbing other tags #97

Closed niktek closed 2 years ago

niktek commented 2 years ago

It would be handy if Sveld could grab any other present @tags in the JSDoc comment block and add them to the props exported per entity found. We would like to use things like @see to point to external docs and also use things like custom @childOf and @parentOf to help show relationships.

FYI we are using Sveld through vite-plugin-sveld on a svelte kit project and we don't see any extra tags come through when adding them (just in case the Sveld CLI behaves differently.

metonym commented 2 years ago

This should be supported since version 0.16 from #87. Here's an example output demonstrating use of the @see and @deprecated tags: https://github.com/carbon-design-system/sveld/blob/21ee19f9a09f8b45037cd553138da2429f712db7/tests/snapshots/prop-comments/output.d.ts#L5-L11

I believe vite-plugin-sveld uses an older version of sveld (version 0.8.1) which doesn't carry these latest changes.

niktek commented 2 years ago

Ahh! PR'd for Matt https://github.com/mattjennings/vite-plugin-sveld/pull/2 and local testing shows it coming through. Thank you!