fix: resolve all 1008 svelte-check type errors across codebase
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:
@@ -166,8 +166,8 @@ async function precacheRecipeData(recipes: BriefRecipeType[]): Promise<void> {
|
||||
dataUrls.push(`/rezepte/${recipe.short_name}/__data.json`);
|
||||
|
||||
// English recipe data (if translation exists)
|
||||
if (recipe.translations?.en?.short_name) {
|
||||
dataUrls.push(`/recipes/${recipe.translations.en.short_name}/__data.json`);
|
||||
if ((recipe as any).translations?.en?.short_name) {
|
||||
dataUrls.push(`/recipes/${(recipe as any).translations.en.short_name}/__data.json`);
|
||||
}
|
||||
|
||||
// Collect metadata for subroute caching
|
||||
|
||||
Reference in New Issue
Block a user