Skip to content

Commit

Permalink
type fix: alexjg -- why did this not error?
Browse files Browse the repository at this point in the history
  • Loading branch information
pvh committed Nov 13, 2023
1 parent 5498490 commit ac3f4f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/automerge-repo/src/Repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { StorageAdapter } from "./storage/StorageAdapter.js"
import { StorageSubsystem } from "./storage/StorageSubsystem.js"
import { CollectionSynchronizer } from "./synchronizer/CollectionSynchronizer.js"
import type { AnyDocumentId, DocumentId, PeerId } from "./types.js"
import { SyncStateMessage } from "./network/messages.js"

/** A Repo is a collection of documents with networking, syncing, and storage capabilities. */
/** The `Repo` is the main entry point of this library
Expand Down Expand Up @@ -151,8 +152,8 @@ export class Repo extends EventEmitter<RepoEvents> {
})

if (storageSubsystem) {
const debouncedSaveSyncState: (syncState: Automerge.SyncState) => void =
throttle(({ documentId, peerId, syncState }: Automerge.SyncState) => {
const debouncedSaveSyncState: (syncState: SyncStateMessage) => void =
throttle(({ documentId, peerId, syncState }: SyncStateMessage) => {
storageSubsystem.saveSyncState(documentId, peerId, syncState)
}, this.saveDebounceRate)

Expand Down

0 comments on commit ac3f4f0

Please sign in to comment.