Skip to content

Commit

Permalink
fix(types): export duplicate type Sidebar (vuejs#2573)
Browse files Browse the repository at this point in the history
  • Loading branch information
zonemeen authored Jul 3, 2023
1 parent 03d93da commit a99dcf9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/reference/default-theme-sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default {
Returns sidebar-related data. The returned object has the following type:

```ts
export interface Sidebar {
export interface DocSidebar {
isOpen: Ref<boolean>
sidebar: ComputedRef<DefaultTheme.SidebarItem[]>
sidebarGroups: ComputedRef<DefaultTheme.SidebarItem[]>
Expand Down
2 changes: 1 addition & 1 deletion theme.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ declare const theme: {
export default theme
export type { DefaultTheme } from './types/default-theme.js'

export const useSidebar: () => DefaultTheme.SideBar
export const useSidebar: () => DefaultTheme.DocSideBar
3 changes: 2 additions & 1 deletion types/default-theme.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type ComputedRef, type Ref } from 'vue'
import type { DocSearchProps } from './docsearch.js'
import type { LocalSearchTranslations } from './local-search.js'
import type { PageData } from './shared.js'
Expand Down Expand Up @@ -222,7 +223,7 @@ export namespace DefaultTheme {
/**
* ReturnType of `useSidebar`
*/
export interface Sidebar {
export interface DocSidebar {
isOpen: Ref<boolean>
sidebar: ComputedRef<SidebarItem[]>
sidebarGroups: ComputedRef<SidebarItem[]>
Expand Down

0 comments on commit a99dcf9

Please sign in to comment.