Fix svelte-check type errors in FileTree and space page
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user