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.
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
}: {
|
}: {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
title?: string;
|
title?: string;
|
||||||
deleteFn: (deleteFiles: boolean) => {};
|
deleteFn: (deleteFiles: boolean) => void | Promise<void>;
|
||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
const selectedState = getBookSelectionState();
|
const selectedState = getBookSelectionState();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// src/routes/api/[...path]/+server.ts
|
// src/routes/api/[...path]/+server.ts
|
||||||
import { BACKEND_API_URL } from '$lib/server/config';
|
import { BACKEND_API_URL } from '$lib/server/config';
|
||||||
import { json, error } from '@sveltejs/kit';
|
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
|
// Helper function to handle both JSON and file responses
|
||||||
async function handleResponse(response: Response) {
|
async function handleResponse(response: Response) {
|
||||||
|
|||||||
Reference in New Issue
Block a user