Skip to content
Open
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
3 changes: 2 additions & 1 deletion packages/offline-transactions/src/outbox/OutboxManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export class OutboxManager {

constructor(
storage: StorageAdapter,
collections: Record<string, Collection>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
collections: Record<string, Collection<any, any, any, any, any>>
) {
this.storage = storage
this.serializer = new TransactionSerializer(collections)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ import type {
import type { Collection, PendingMutation } from "@tanstack/db"

export class TransactionSerializer {
private collections: Record<string, Collection>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
private collections: Record<string, Collection<any, any, any, any, any>>
private collectionIdToKey: Map<string, string>

constructor(collections: Record<string, Collection>) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(
collections: Record<string, Collection<any, any, any, any, any>>
) {
this.collections = collections
// Create reverse lookup from collection.id to registry key
this.collectionIdToKey = new Map()
Expand Down
3 changes: 2 additions & 1 deletion packages/offline-transactions/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ export interface StorageDiagnostic {
}

export interface OfflineConfig {
collections: Record<string, Collection>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
collections: Record<string, Collection<any, any, any, any, any>>
mutationFns: Record<string, OfflineMutationFn>
storage?: StorageAdapter
maxConcurrency?: number
Expand Down
Loading