From ff2a53a655cf42b2fa2b79726e05f9971b04fb84 Mon Sep 17 00:00:00 2001 From: GCHQDeveloper81 <175597767+GCHQDeveloper81@users.noreply.github.com> Date: Thu, 18 Jul 2024 02:17:55 -0700 Subject: [PATCH] Update type declaration --- src/app.d.ts | 3 +++ src/lib/components/layout/nav/SideNav.svelte | 6 ++---- src/lib/constants.ts | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 src/lib/constants.ts diff --git a/src/app.d.ts b/src/app.d.ts index b2f5f24..44da287 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -2,7 +2,10 @@ // See https://kit.svelte.dev/docs/types#app // for information about these interfaces + declare global { + declare const PUBLIC_VERSION: string; + namespace App { // interface Error {} // interface Locals {} diff --git a/src/lib/components/layout/nav/SideNav.svelte b/src/lib/components/layout/nav/SideNav.svelte index 3a7ba7b..de49d8c 100644 --- a/src/lib/components/layout/nav/SideNav.svelte +++ b/src/lib/components/layout/nav/SideNav.svelte @@ -32,9 +32,7 @@ import { page } from '$app/stores'; import { shouldHighlightSideNav } from '$lib/util/nav.utils'; import { sources } from '$stores/sources/sources.store'; - - // this will be set to the version number from package.json - declare const PUBLIC_VERSION: string; + import { version } from '$lib/constants'; type SideNavItemDetail = { [key in SideNavId]: { @@ -94,7 +92,7 @@