diff --git a/packages/sds/src/message_channel/mem_local_history.ts b/packages/sds/src/message_channel/mem_local_history.ts index 4042ee69c4..11fd57199b 100644 --- a/packages/sds/src/message_channel/mem_local_history.ts +++ b/packages/sds/src/message_channel/mem_local_history.ts @@ -1,6 +1,6 @@ import _ from "lodash"; -import { ChannelId, ContentMessage, isContentMessage } from "./message.js"; +import { type ChannelId, ContentMessage, isContentMessage } from "./message.js"; import { PersistentStorage } from "./persistent_storage.js"; export const DEFAULT_MAX_LENGTH = 10_000; @@ -48,10 +48,10 @@ export interface ILocalHistory { ): number; } -export interface MemLocalHistoryOptions { +export type MemLocalHistoryOptions = { storage?: ChannelId | PersistentStorage; maxSize?: number; -} +}; export class MemLocalHistory implements ILocalHistory { private items: ContentMessage[] = []; diff --git a/packages/sds/src/message_channel/message_channel.ts b/packages/sds/src/message_channel/message_channel.ts index 30f744a10c..8b23809627 100644 --- a/packages/sds/src/message_channel/message_channel.ts +++ b/packages/sds/src/message_channel/message_channel.ts @@ -23,6 +23,8 @@ import { } from "./message.js"; import { RepairConfig, RepairManager } from "./repair/repair.js"; +export type { ILocalHistory }; + export const DEFAULT_BLOOM_FILTER_OPTIONS = { capacity: 10000, errorRate: 0.001 diff --git a/packages/sds/src/message_channel/repair/repair.ts b/packages/sds/src/message_channel/repair/repair.ts index 5da41d224c..1a8a85f43e 100644 --- a/packages/sds/src/message_channel/repair/repair.ts +++ b/packages/sds/src/message_channel/repair/repair.ts @@ -1,8 +1,8 @@ import { Logger } from "@waku/utils"; -import type { ILocalHistory } from "../mem_local_history.js"; import type { HistoryEntry, MessageId } from "../message.js"; import { Message } from "../message.js"; +import type { ILocalHistory } from "../message_channel.js"; import { IncomingRepairBuffer, OutgoingRepairBuffer } from "./buffers.js"; import {