From dc953b961a93aeb249ba17ebe63be0bd5c4b9aa1 Mon Sep 17 00:00:00 2001 From: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Date: Fri, 8 Sep 2023 02:50:27 -0300 Subject: [PATCH] Add missing types to navbar and sidebar items (#24) --- website/src/.vitepress/config/navigation/navbar.ts | 4 +++- website/src/.vitepress/config/navigation/sidebar.ts | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/website/src/.vitepress/config/navigation/navbar.ts b/website/src/.vitepress/config/navigation/navbar.ts index 8e1ef8c8..f53cf447 100644 --- a/website/src/.vitepress/config/navigation/navbar.ts +++ b/website/src/.vitepress/config/navigation/navbar.ts @@ -1,6 +1,8 @@ +import type { DefaultTheme } from "vitepress"; + const APP_VERSION = "0.14.6"; -const nav = [ +const nav: DefaultTheme.NavItem[] = [ { text: "Documentation", link: "/docs/guides/getting-started", diff --git a/website/src/.vitepress/config/navigation/sidebar.ts b/website/src/.vitepress/config/navigation/sidebar.ts index 00696ce7..e7a9e12f 100644 --- a/website/src/.vitepress/config/navigation/sidebar.ts +++ b/website/src/.vitepress/config/navigation/sidebar.ts @@ -1,4 +1,6 @@ -const sidebar = { +import type { DefaultTheme } from "vitepress"; + +const sidebar: DefaultTheme.SidebarMulti = { "/download/": defaultSidebar(), "/extensions/": defaultSidebar(), "/docs/": defaultSidebar(), @@ -8,7 +10,7 @@ const sidebar = { "/sandbox/": defaultSidebar(), }; -function defaultSidebar() { +function defaultSidebar(): DefaultTheme.SidebarItem[] { return [ { text: "Frequently Asked Questions",