Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chilly-phones-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tanstack/electric-db-collection": patch
---

fix: explicitly type `electricCollectionOptions` return value
6 changes: 5 additions & 1 deletion packages/electric-db-collection/src/electric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,11 @@ export function electricCollectionOptions<
TExplicit extends Row<unknown> = Row<unknown>,
TSchema extends StandardSchemaV1 = never,
TFallback extends Row<unknown> = Row<unknown>,
>(config: ElectricCollectionConfig<TExplicit, TSchema, TFallback>) {
>(
config: ElectricCollectionConfig<TExplicit, TSchema, TFallback>
): CollectionConfig<ResolveType<TExplicit, TSchema, TFallback>> & {
utils: ElectricCollectionUtils
} {
const seenTxids = new Store<Set<Txid>>(new Set([]))
const sync = createElectricSync<ResolveType<TExplicit, TSchema, TFallback>>(
config.shapeOptions,
Expand Down
Loading