-
I have a function that returns a tuple const [profile, other] = getProfile()
// The following causes "Cannot use 'profile' as a store. 'profile' needs
// to be an object with a subscribe method on it."
console.log($profile.userName) The code actually runs fine (the store is a valid store), so I'm not sure if this is a false positive or if I'm doing something wrong. Is there some way to make svelte-check happy or is there a better way to return a store together with other values from a function? |
Beta Was this translation helpful? Give feedback.
Answered by
garth
Dec 9, 2024
Replies: 1 comment
-
Ok, so just had Doh moment. Forgot the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
garth
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok, so just had Doh moment. Forgot the
as const
on the function return value. All good now.