Skip to content

Interface: UseCommentsResult

@roomful/vue


@roomful/vue / UseCommentsResult

Defined in: vue/src/index.ts:348

Describes the return value of useComments.

add: (input) => Promise<CommentThread>

Defined in: vue/src/index.ts:358

Opens a new thread authored by the local peer at an anchor.

Opens a new thread authored by the local peer at anchor. The thread id and createdAt are generated.

The thread anchor and root comment body.

CommentAnchor

string

Promise<CommentThread>

A promise resolving to the created thread.


getByElement: (elementId) => CommentThread[]

Defined in: vue/src/index.ts:388

Returns the threads anchored to an element.

Returns the threads anchored to elementId (element or text-range anchors).

string

The element id to filter by.

CommentThread[]

The matching threads.


getOpen: () => CommentThread[]

Defined in: vue/src/index.ts:393

Returns the unresolved threads.

Returns the unresolved threads.

CommentThread[]

The open threads.


threads: ReadonlyRef<CommentThread[]>

Defined in: vue/src/index.ts:353

Exposes the current comment threads, oldest first. Reactive: updates on any local or remote thread change.

reopen(threadId): Promise<CommentThread>

Defined in: vue/src/index.ts:383

Reopens a resolved thread.

string

The thread to reopen.

Promise<CommentThread>

A promise resolving to the updated thread.


reply(threadId, text): Promise<CommentThread>

Defined in: vue/src/index.ts:367

Appends a reply authored by the local peer to a thread.

string

The thread to reply to.

string

The reply body.

Promise<CommentThread>

A promise resolving to the updated thread.


resolve(threadId): Promise<CommentThread>

Defined in: vue/src/index.ts:375

Marks a thread resolved.

string

The thread to resolve.

Promise<CommentThread>

A promise resolving to the updated thread.