Add optional clone() to IPurchasableOffer

useCatalog's localization-refresh effect calls 'offer?.clone ? offer.clone() : offer'
to mint fresh references when locale strings change. Offer.ts implements
clone() but the interface didn't declare it, so the guarded call broke
tsgo. FurnitureOffer (the lazy wrapper) doesn't implement clone — and
the call site is guarded — so 'clone?(): IPurchasableOffer' (optional)
keeps the interface honest without forcing FurnitureOffer to grow a
no-op clone.

Net tsgo error count: -4.
This commit is contained in:
simoleo89
2026-05-11 21:34:17 +02:00
parent f57266af03
commit a8065f6cf0
+1
View File
@@ -24,4 +24,5 @@ export interface IPurchasableOffer
products: IProduct[];
itemIds: string;
haveOffer: boolean;
clone?(): IPurchasableOffer;
}