You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe perhaps CollectionStore (and DocStore?) has the wrong unsubscriber type...
import{getFirestore}from'firebase/firestore';import{derived}from'svelte/store';import{collectionStore}from'sveltefire';interfacePost{id: string;title: string;body: string;}constposts=collectionStore<Post>(getFirestore(),'posts');constpostsCount=derived(posts,$posts=>$posts.length);// ^^^^^// But with the cast, all is well...constpostsCount2=derived(postsasReadable<Post[]>,$posts=>$posts.length);
No overload matches this call.
The last overload gave the following error.
Argument of type 'CollectionStore<Post[]>' is not assignable to parameter of type 'Stores'.
Type 'CollectionStore<Post[]>' is not assignable to type 'Readable<any>'.
The types returned by 'subscribe(...)' are incompatible between these types.
Type 'void | (() => void)' is not assignable to type 'Unsubscriber'.
Type 'void' is not assignable to type 'Unsubscriber'. ts(2769)
The text was updated successfully, but these errors were encountered:
I believe perhaps
CollectionStore
(and DocStore?) has the wrong unsubscriber type...The text was updated successfully, but these errors were encountered: