vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.87k stars 400 forks source link

(vue-component-meta) Support tags for slots and expose #4612

Open thomasaull opened 3 months ago

thomasaull commented 3 months ago

What problem does this feature solve?

I'm using JSDoc tags to automatically show a warning for deprecated props in storybook, for example:

type Props = {
  /**
   * @deprecated Will be removed in the next major version
   */
  someProp?: string
}

would render a storybook control like this in my project: image

I would like to add the same functionality to events and slots. According to the types events already support tags, but proper extraction is blocked by this until vue 3.5 is released. For SlotMeta and ExposeMeta tags are not present yet.

What does the proposed solution look like?

Generate meta information about tags for slots and expose