From 263607b279cbfd3db80bbe0ea66000560d24993a Mon Sep 17 00:00:00 2001 From: zRains <2296342883@qq.com> Date: Tue, 14 Jun 2022 08:51:37 +0100 Subject: [PATCH] fix: better nav item types (#714) --- types/default-theme.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/default-theme.d.ts b/types/default-theme.d.ts index aec914be7fb2..ec0d69a79c23 100644 --- a/types/default-theme.d.ts +++ b/types/default-theme.d.ts @@ -86,9 +86,14 @@ export namespace DefaultTheme { activeMatch?: string } + export type NavItemChildren = { + text?: string + items: NavItemWithLink[] + } + export interface NavItemWithChildren { text?: string - items: NavItem[] + items: (NavItemChildren | NavItemWithLink)[] } // sidebar -------------------------------------------------------------------