fix: resolve all 1008 svelte-check type errors across codebase
CI / update (push) Successful in 1m54s

Add type annotations, JSDoc types, null checks, and proper generics
to eliminate all svelte-check errors. Key changes include:
- Type $state(null) variables to avoid 'never' inference
- Add JSDoc typedefs for plain <script> components
- Fix mongoose model typing with Model<any> to avoid union complexity
- Add App.Error/App.PageState interfaces in app.d.ts
- Fix tuple types to array types in types.ts
- Type catch block errors and API handler params
- Add null safety for DOM queries and optional chaining
- Add standard line-clamp property alongside -webkit- prefix
This commit is contained in:
2026-03-02 08:40:15 +01:00
parent 9e5fef1463
commit 4a931c7e30
125 changed files with 871 additions and 600 deletions
+2 -2
View File
@@ -102,7 +102,7 @@ export const POST: RequestHandler = async ({ request, locals }) => {
exchangeRate = conversion.exchangeRate;
} catch (e) {
console.error('Currency conversion error:', e);
throw error(400, `Failed to convert ${inputCurrency} to CHF: ${e.message}`);
throw error(400, `Failed to convert ${inputCurrency} to CHF: ${e instanceof Error ? e.message : String(e)}`);
}
}
@@ -146,7 +146,7 @@ export const POST: RequestHandler = async ({ request, locals }) => {
};
});
const splitPromises = convertedSplits.map((split) => {
const splitPromises = convertedSplits.map((split: any) => {
return PaymentSplit.create(split);
});