Skip to content

Interface: CommentsOptions

@roomful/core


@roomful/core / CommentsOptions

Defined in: packages/core/src/types.ts:2061

Configures the comments engine.

optional restEndpoint: string

Defined in: packages/core/src/types.ts:2076

The REST endpoint used when storage is 'rest'. Threads are loaded from it on init and mutations are POSTed back to it.


optional storage: "memory" | "indexeddb" | "rest"

Defined in: packages/core/src/types.ts:2070

Selects the storage backend.

  • 'memory' (default) — the synced, in-room collaborative structure.
  • 'indexeddb' — additionally persists threads to the browser so they reload on the next session.
  • 'rest' — additionally mirrors threads to a REST endpoint.

optional storageAdapter: CommentsStorageAdapter

Defined in: packages/core/src/types.ts:2085

A custom durable CommentsStorageAdapter. When set, threads are restored from it on startup (into an otherwise-empty room) and saved after every change, so comments survive reconnects and reloads. Use this with the default storage: 'memory' to back comments with Postgres, SQLite, or any store; see docs/reference/comments-storage.md.