adapt typescript to strict mode

This commit is contained in:
imperosol
2026-08-20 16:17:23 +02:00
parent 3291a78d2b
commit 236860d0f5
40 changed files with 386 additions and 242 deletions
@@ -1,4 +1,9 @@
import { newsDeleteNews, newsFetchNewsDates, newsPublishNews } from "#openapi";
import {
newsDeleteNews,
newsFetchNewsDates,
newsPublishNews,
type PaginatedResponseSchemaNewsDateSchema,
} from "#openapi";
// This will be used in jinja templates,
// so we cannot use real enums as those are purely an abstraction of Typescript
@@ -64,7 +69,8 @@ document.addEventListener("alpine:init", () => {
// biome-ignore lint/style/useNamingConvention: api is snake-case
query: { news_id: this.newsId, page: 1, page_size: 1 },
});
return response.data.count;
return (response.data as PaginatedResponseSchemaNewsDateSchema).count;
},
weeklyEventWarningMessage(nbEvents: number): string {