From fbe8a8bf2172647ecac14851c7daaf29f70758bf Mon Sep 17 00:00:00 2001 From: patrick Date: Mon, 17 Aug 2026 17:42:34 -0400 Subject: [PATCH] fix: type the proxy handlers and the delete callback The RequestHandler import sat commented out while all four handlers were annotated with it, so every destructured parameter was an implicit any -- 24 of the 30 svelte-check errors. deleteFn returned `{}`, which void is not assignable to. --- frontend/src/lib/components/forms/book-delete.svelte | 2 +- frontend/src/routes/api/[...path]/+server.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/forms/book-delete.svelte b/frontend/src/lib/components/forms/book-delete.svelte index db4200a..ffc91ce 100644 --- a/frontend/src/lib/components/forms/book-delete.svelte +++ b/frontend/src/lib/components/forms/book-delete.svelte @@ -13,7 +13,7 @@ }: { open: boolean; title?: string; - deleteFn: (deleteFiles: boolean) => {}; + deleteFn: (deleteFiles: boolean) => void | Promise; } = $props(); const selectedState = getBookSelectionState(); diff --git a/frontend/src/routes/api/[...path]/+server.ts b/frontend/src/routes/api/[...path]/+server.ts index ea9eaae..948f6b9 100644 --- a/frontend/src/routes/api/[...path]/+server.ts +++ b/frontend/src/routes/api/[...path]/+server.ts @@ -1,7 +1,7 @@ // src/routes/api/[...path]/+server.ts import { BACKEND_API_URL } from '$lib/server/config'; import { json, error } from '@sveltejs/kit'; -// import type { RequestHandler } from './$types'; +import type { RequestHandler } from './$types'; // Helper function to handle both JSON and file responses async function handleResponse(response: Response) {