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

Events doesn't contain description #56

Open
AbdallahAlhaddad opened this issue Jul 4, 2023 · 0 comments
Open

Events doesn't contain description #56

AbdallahAlhaddad opened this issue Jul 4, 2023 · 0 comments

Comments

@AbdallahAlhaddad
Copy link

Bug/Problem description:

  • Response doesn't return the JSDoc description for events.
"nuxt": "3.6.1",
"nuxt-component-meta": "0.5.3",
"vue-component-meta": "1.8.3",
"nodejs": "18.16.1"

Demo Code:

type ClrVariants = 'primary' | 'secondary'

interface TooltipProps {
  /**
   * Color variant to choose from, see ...
   */
  color?: ClrVariants
  text: string
}

interface TooltipEvents {
  /**
   * change evt description
   */
  (e: 'change', id: number): void

  /**
   * test evt description
   */
  (e: 'test', value: string): void
}

interface TooltipSlots {
  /**
   * default Slot description
   */
  default(props: { msg: string }): any
}

const { color = 'primary', text } = defineProps<TooltipProps>()
defineEmits<TooltipEvents>()
defineSlots<TooltipSlots>()

Api Response:

{
  "mode": "all",
  "prefetch": false,
  "preload": false,
  "filePath": "components/Tooltip.vue",
  "pascalName": "Tooltip",
  "kebabName": "tooltip",
  "chunkName": "components/tooltip",
  "shortPath": "components/Tooltip.vue",
  "export": "default",
  "priority": 1,
  "fullPath": "nuxt-proj-absoulte-path/components/Tooltip.vue",
  "meta": {
    "props": [
      {
        "name": "text",
        "global": false,
        "description": "",
        "tags": [],
        "required": true,
        "type": "string",
        "declarations": [
          {
            "file": "nuxt-proj-absoulte-path/components/Tooltip.vue",
            "range": [290, 302]
          }
        ],
        "schema": "string"
      },
      {
        "name": "color",
        "global": false,
        "description": "Color variant to choose from, see ...",
        "tags": [],
        "required": false,
        "type": "ClrVariants | undefined",
        "declarations": [
          {
            "file": "nuxt-proj-absoulte-path/components/Tooltip.vue",
            "range": [268, 287]
          }
        ],
        "schema": {
          "kind": "enum",
          "type": "ClrVariants | undefined",
          "schema": ["undefined", "\"primary\"", "\"secondary\""]
        }
      }
    ],
    "slots": [
      {
        "name": "default",
        "type": "{ msg: string; }",
        "description": "default Slot description",
        "declarations": [
          {
            "file": "nuxt-proj-absoulte-path/components/Tooltip.vue",
            "range": [552, 588]
          }
        ],
        "schema": {
          "kind": "object",
          "type": "{ msg: string; }",
          "schema": {
            "msg": {
              "name": "msg",
              "global": false,
              "description": "",
              "tags": [],
              "required": true,
              "type": "string",
              "declarations": [
                {
                  "file": "nuxt-proj-absoulte-path/components/Tooltip.vue",
                  "range": [569, 580]
                }
              ],
              "schema": "string"
            }
          }
        }
      }
    ],
    "events": [
      {
        "name": "change",
        "type": "[id: number]",
        "signature": "(event: \"change\", id: number): void",
        "declarations": [
          {
            "file": "nuxt-proj-absoulte-path/node_modules/@vue/runtime-core/dist/runtime-core.d.ts",
            "range": [4468, 4503]
          }
        ],
        "schema": ["number"]
      },
      {
        "name": "test",
        "type": "[value: string]",
        "signature": "(event: \"test\", value: string): void",
        "declarations": [
          {
            "file": "nuxt-proj-absoulte-path/node_modules/@vue/runtime-core/dist/runtime-core.d.ts",
            "range": [4468, 4503]
          }
        ],
        "schema": ["string"]
      }
    ],
    "exposed": [
      {
        "name": "$slots",
        "type": "Readonly<InternalSlots> & TooltipSlots",
        "description": "",
        "declarations": [
          {
            "file": "nuxt-proj-absoulte-path/node_modules/@vue/runtime-core/dist/runtime-core.d.ts",
            "range": [8406, 8433]
          }
        ],
        "schema": {
          "kind": "object",
          "type": "Readonly<InternalSlots> & TooltipSlots",
          "schema": {
            "default": {
              "name": "default",
              "global": false,
              "description": "default Slot description",
              "tags": [],
              "required": true,
              "type": "(props: { msg: string; }) => any",
              "declarations": [
                {
                  "file": "nuxt-proj-absoulte-path/components/Tooltip.vue",
                  "range": [552, 588]
                }
              ],
              "schema": {
                "kind": "event",
                "type": "(props: { msg: string; }): any",
                "schema": []
              }
            }
          }
        }
      },
      {
        "name": "text",
        "type": "string",
        "description": "",
        "declarations": [
          {
            "file": "nuxt-proj-absoulte-path/components/Tooltip.vue",
            "range": [290, 302]
          }
        ],
        "schema": "string"
      },
      {
        "name": "color",
        "type": "ClrVariants | undefined",
        "description": "Color variant to choose from, see ...",
        "declarations": [
          {
            "file": "nuxt-proj-absoulte-path/components/Tooltip.vue",
            "range": [268, 287]
          }
        ],
        "schema": {
          "kind": "enum",
          "type": "ClrVariants | undefined",
          "schema": ["undefined", "\"primary\"", "\"secondary\""]
        }
      },
      {
        "name": "onChange",
        "type": "((id: number) => any) | undefined",
        "description": "",
        "declarations": [],
        "schema": {
          "kind": "enum",
          "type": "((id: number) => any) | undefined",
          "schema": [
            "undefined",
            {
              "kind": "event",
              "type": "(id: number): any",
              "schema": ["number"]
            }
          ]
        }
      },
      {
        "name": "onTest",
        "type": "((value: string) => any) | undefined",
        "description": "",
        "declarations": [],
        "schema": {
          "kind": "enum",
          "type": "((value: string) => any) | undefined",
          "schema": [
            "undefined",
            {
              "kind": "event",
              "type": "(value: string): any",
              "schema": ["string"]
            }
          ]
        }
      }
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant