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

missing types for nested sidebar group #3127

Closed
1 task done
ulivz opened this issue Feb 25, 2023 · 0 comments · Fixed by #3128
Closed
1 task done

missing types for nested sidebar group #3127

ulivz opened this issue Feb 25, 2023 · 0 comments · Fixed by #3128
Labels
type: bug Something isn't working version: 1.x Relates to version 1 of VuePress

Comments

@ulivz
Copy link
Member

ulivz commented Feb 25, 2023

  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

Currently we config config nested sub group like this:

import { defineConfig } from 'vuepress/config'

export default defineConfig((ctx) => ({
  themeConfig: {
    sidebar: {
      '/guide/': [
        {
          title: 'Guide',
          collapsable: false,
          children: [
            '',
            'getting-started',
            // ...
            {
              title: 'sub-group-title',
              children: [
                'getting-started',
                 // ...
              ]
            }
          ]
        }
      ]
    }
  }
}))

Rendering:

image

But the types are missing.

What is expected?

types should be correct and tsc server should pass type check.

What is actually happening?

types are missing:

image

Other relevant information

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: macOS 12.3
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 16.19.1 - ~/.nvm/versions/node/v16.19.1/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v16.19.1/bin/npm
  Browsers:
    Chrome: 110.0.5481.100
    Edge: Not Found
    Firefox: Not Found
    Safari: 15.4
  npmPackages:
    @vuepress/core:  1.9.8
    @vuepress/theme-default:  1.9.8
    vuepress:  1.9.8
  npmGlobalPackages:
    vuepress: Not Found
@ulivz ulivz added type: bug Something isn't working version: 1.x Relates to version 1 of VuePress labels Feb 25, 2023
ulivz added a commit that referenced this issue Feb 25, 2023
Currently we config config nested sub group<sup>[1]</sup>, but the types are missing:

[1] https://vuepress.vuejs.org/theme/default-theme-config.html#sidebar-groups
ulivz added a commit that referenced this issue Feb 25, 2023
Currently we are allowed to config nested sub group<sup>[1]</sup>, but the types are missing:

[1] https://vuepress.vuejs.org/theme/default-theme-config.html#sidebar-groups
ulivz added a commit that referenced this issue Feb 25, 2023
)

Currently we are allowed to config nested sub group<sup>[1]</sup>, but the types are missing:

[1] https://vuepress.vuejs.org/theme/default-theme-config.html#sidebar-groups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working version: 1.x Relates to version 1 of VuePress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant