Closed itaysmalia closed 3 years ago
I think it might be a svelte-typescript issue... I will post the issue in the svelte repo and close this one, I'll update this one for any update in the new one.
Can you point us where the fix to this is?
I am new to typescript and I keep getting similar errors:
/Users/.../project/src/routes/index.svelte:61:10
Error: Object is of type 'unknown'. (ts)
{:else}
{#each $products.data.products as product}
<li>{product.title} by {product.author.name}</li>
It throws it at the call of $products.data
, and both calls of product
.
Yes, I get this as well
I have a very simple component:
and I have a super annoying ts warning that says
Object is possibly 'null' or 'undefined'.ts(2533)
on$users.data.users
inside the #each loop.