fix TS types

This commit is contained in:
imperosol
2025-06-30 18:34:30 +02:00
parent 6e724a9c74
commit a3ac04fc9e
10 changed files with 22 additions and 12 deletions

View File

@ -1,7 +1,7 @@
import { AlertMessage } from "#core:utils/alert-message";
import { BasketItem } from "#counter:counter/basket";
import type { CounterConfig, ErrorMessage } from "#counter:counter/types";
import type { CounterProductSelect } from "./components/counter-product-select-index.ts";
import { AlertMessage } from "#core:utils/alert-message";
document.addEventListener("alpine:init", () => {
Alpine.data("counter", (config: CounterConfig) => ({

View File

@ -167,7 +167,7 @@ document.addEventListener("alpine:init", () => {
});
// if products to download are already in-memory, directly take them.
// If not, fetch them.
const products =
const products: ProductSchema[] =
this.nbPages > 1
? await paginated(productSearchProductsDetailed, this.getQueryParams())
: Object.values<ProductSchema[]>(this.products).flat();

View File

@ -1,6 +1,6 @@
import { AlertMessage } from "#core:utils/alert-message";
import Alpine from "alpinejs";
import { producttypeReorder } from "#openapi";
import { AlertMessage } from "#core:utils/alert-message";
document.addEventListener("alpine:init", () => {
Alpine.data("productTypesList", () => ({

View File

@ -1,4 +1,4 @@
type ErrorMessage = string;
export type ErrorMessage = string;
export interface InitialFormData {
/* Used to refill the form when the backend raises an error */