Fix svelte-check type errors in FileTree and space page

This commit is contained in:
2026-07-19 12:02:33 -04:00
parent 7de21ffcd5
commit a2b7b5871a
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -31,7 +31,7 @@
onSetEntry: (file: SpaceFile) => void; onSetEntry: (file: SpaceFile) => void;
} = $props(); } = $props();
let fileInput: HTMLInputElement; let fileInput: HTMLInputElement = $state()!;
function iconFor(path: string): string { function iconFor(path: string): string {
const lower = path.toLowerCase(); const lower = path.toLowerCase();
@@ -77,7 +77,9 @@
<Icon icon={iconFor(file.path)} class="text-base flex-shrink-0" /> <Icon icon={iconFor(file.path)} class="text-base flex-shrink-0" />
<span class="truncate">{file.path}</span> <span class="truncate">{file.path}</span>
{#if file.path === entrypoint} {#if file.path === entrypoint}
<Icon icon="mdi:star" class="text-amber-500 text-xs flex-shrink-0" title="Entrypoint" /> <span title="Entrypoint">
<Icon icon="mdi:star" class="text-amber-500 text-xs flex-shrink-0" />
</span>
{/if} {/if}
</button> </button>
{#if !readOnly} {#if !readOnly}
+1 -1
View File
@@ -19,7 +19,7 @@
kind: string; kind: string;
} }
const spaceId = $page.params.id; const spaceId = $page.params.id as string;
let spaceName = $state('Space'); let spaceName = $state('Space');
let entrypoint = $state('main.typ'); let entrypoint = $state('main.typ');