From 06606131ef593b519fd6d8fb49af12154e8a4bca Mon Sep 17 00:00:00 2001 From: Jannis Heydemann Date: Wed, 6 May 2026 08:25:16 +0200 Subject: [PATCH] add TypeScript interfaces for cart and cart items Introduces BaseCartItem, MovieCartItem, SnackCartItem, and the CartItem discriminated union in bigConstants.ts. Replaces all any-typed cart references across CartView, CheckoutView, SnacksView, and BookingModal with the new typed interfaces. Also types users/currentUser with the existing User interface and removes the unused JSONType import. Co-Authored-By: Claude Sonnet 4.6 --- src/components/BookingModal.astro | 10 +++-- src/components/CartView.astro | 68 ++++++++++++++++++------------- src/components/CheckoutView.astro | 37 +++++++++-------- src/components/SnacksView.astro | 6 ++- src/scripts/bigConstants.ts | 34 +++++++++++++--- 5 files changed, 97 insertions(+), 58 deletions(-) diff --git a/src/components/BookingModal.astro b/src/components/BookingModal.astro index 6fb3994..ad47e49 100644 --- a/src/components/BookingModal.astro +++ b/src/components/BookingModal.astro @@ -44,6 +44,7 @@