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

Default value and keywords of exported aliases not merged #83

Closed
ekhaled opened this issue Sep 8, 2021 · 1 comment · Fixed by #84
Closed

Default value and keywords of exported aliases not merged #83

ekhaled opened this issue Sep 8, 2021 · 1 comment · Fixed by #84
Labels
enhancement New feature or request
Milestone

Comments

@ekhaled
Copy link
Contributor

ekhaled commented Sep 8, 2021

It would be nice if we could get the default values and keywords of exported aliases

    /**
     * CSS class for the component
     * @type {'main' | 'sidebar'}
     * 
     */
    let klass = "main";

    export {klass as class}

Current output:

    {
      "visibility": "public",
      "description": "CSS class for the component",
      "keywords": [],
      ...
      "type": {
        "kind": "union",
        "text": "'main' | 'sidebar'",
        "type": [
          {
            ...
          },
          {
            ...
          }
        ]
      },
      "localName": "klass"
    }

Preferred output:

    {
      "keywords": [
        {
          "name": "type",
          "description": "{'main' | 'sidebar'}"
        }
      ],
      "visibility": "public",
      "description": "CSS class for the component",
      ...
      "type": {
        "kind": "union",
        "text": "'main' | 'sidebar'",
        "type": [...] //same as above
      },
      "localName": "klass",
      "defaultValue": "main"
    }
@alexprey
Copy link
Collaborator

Hi, you are completelly right!

@alexprey alexprey added the enhancement New feature or request label Sep 24, 2021
@alexprey alexprey added this to the 4.0.0 milestone Sep 24, 2021
alexprey added a commit that referenced this issue Sep 24, 2021
fix #83: Merge keywords and default values for aliases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants