summaryrefslogtreecommitdiff
path: root/examples/with-nanostores
diff options
context:
space:
mode:
authorGravatar Bjorn Lu <bjornlu.dev@gmail.com> 2024-03-13 17:35:33 +0800
committerGravatar GitHub <noreply@github.com> 2024-03-13 17:35:33 +0800
commit8dceb5eb36226f1d097d02c47e1b24231dc333d1 (patch)
tree22662b9b3bbb9555d7152b4239fac00d55b9d1b0 /examples/with-nanostores
parentf456fed23cfffd5b7d09d1b541f858a90f5ea20f (diff)
downloadastro-8dceb5eb36226f1d097d02c47e1b24231dc333d1.tar.gz
astro-8dceb5eb36226f1d097d02c47e1b24231dc333d1.tar.zst
astro-8dceb5eb36226f1d097d02c47e1b24231dc333d1.zip
Fix check example CI fail (#10415)
Diffstat (limited to 'examples/with-nanostores')
-rw-r--r--examples/with-nanostores/src/cartStore.ts2
-rw-r--r--examples/with-nanostores/tsconfig.json7
2 files changed, 7 insertions, 2 deletions
diff --git a/examples/with-nanostores/src/cartStore.ts b/examples/with-nanostores/src/cartStore.ts
index 00270180a..a57a6ce87 100644
--- a/examples/with-nanostores/src/cartStore.ts
+++ b/examples/with-nanostores/src/cartStore.ts
@@ -13,7 +13,7 @@ export type CartItemDisplayInfo = Pick<CartItem, 'id' | 'name' | 'imageSrc'>;
export const cartItems = map<Record<string, CartItem>>({});
-export function addCartItem({ id, name, imageSrc }: CartItem) {
+export function addCartItem({ id, name, imageSrc }: CartItemDisplayInfo) {
const existingEntry = cartItems.get()[id];
if (existingEntry) {
cartItems.setKey(id, {
diff --git a/examples/with-nanostores/tsconfig.json b/examples/with-nanostores/tsconfig.json
index d78f81ec4..bdd1b5a88 100644
--- a/examples/with-nanostores/tsconfig.json
+++ b/examples/with-nanostores/tsconfig.json
@@ -1,3 +1,8 @@
{
- "extends": "astro/tsconfigs/base"
+ "extends": "astro/tsconfigs/base",
+ "compilerOptions": {
+ // Preact specific settings
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact"
+ }
}