Interface: CommentsOptions
@roomful/svelte / CommentsOptions
Interface: CommentsOptions
Section titled “Interface: CommentsOptions”Defined in: packages/core/dist/types.d.ts:1769
Configures the comments engine.
Properties
Section titled “Properties”restEndpoint?
Section titled “restEndpoint?”
optionalrestEndpoint:string
Defined in: packages/core/dist/types.d.ts:1783
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/dist/types.d.ts:1778
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/dist/types.d.ts:1791
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.