diff --git a/src/sync/namespace-sync-state.js b/src/sync/namespace-sync-state.js index 42b171b4..8b3335bf 100644 --- a/src/sync/namespace-sync-state.js +++ b/src/sync/namespace-sync-state.js @@ -62,7 +62,7 @@ export class NamespaceSyncState { const state = { dataToSync: false, coreCount: this.#coreCount, - localState: createState(), + localState: { want: 0, have: 0, wanted: 0 }, remoteStates: {}, } for (const css of this.#coreStates.values()) { @@ -133,28 +133,6 @@ export class NamespaceSyncState { } } -/** - * @overload - * @returns {SyncState['localState']} - */ - -/** - * @overload - * @param {import('./core-sync-state.js').PeerNamespaceState['status']} status - * @returns {import('./core-sync-state.js').PeerNamespaceState} - */ - -/** - * @param {import('./core-sync-state.js').PeerNamespaceState['status']} [status] - */ -export function createState(status) { - if (status) { - return { want: 0, have: 0, wanted: 0, status } - } else { - return { want: 0, have: 0, wanted: 0 } - } -} - /** * @overload * @param {SyncState['localState']} accumulator