Interface: CommentsOptions
@roomful/core / CommentsOptions
Interface: CommentsOptions
Section titled “Interface: CommentsOptions”Defined in: packages/core/src/types.ts:2061
Configures the comments engine.
Properties
Section titled “Properties”restEndpoint?
Section titled “restEndpoint?”
optionalrestEndpoint: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.
storage?
Section titled “storage?”
optionalstorage:"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.
storageAdapter?
Section titled “storageAdapter?”
optionalstorageAdapter: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.