fix: resolve __APP_VERSION__ type error in svelte-check

Move the global type declaration inside declare global block and
reference the constant via a local variable in the script block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Frederic Cabassut
2026-03-06 06:14:59 +01:00
co-authored by Claude Opus 4.6
parent ca8362d151
commit e56016a5b2
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare const __APP_VERSION__: string;
declare global {
const __APP_VERSION__: string;
namespace App {
// interface Error {}
// interface Locals {}
+3 -1
View File
@@ -6,6 +6,8 @@
import { loadNotes } from '$lib/stores/notes.js';
import { onMount } from 'svelte';
const appVersion = __APP_VERSION__;
let { children } = $props();
let sidebarOpen = $state(false);
@@ -25,7 +27,7 @@
</main>
<footer class="pb-4 pt-8 text-center text-xs text-gray-400 lg:ml-64">
Crumbs by Bretzel v{__APP_VERSION__} &mdash; made with 🥨 in Strasbourg
Crumbs by Bretzel v{appVersion} &mdash; made with 🥨 in Strasbourg
</footer>
<Toast />