Interface: InjectCommentsResult
@roomful/angular / InjectCommentsResult
Interface: InjectCommentsResult
Section titled “Interface: InjectCommentsResult”Defined in: angular/src/index.ts:337
Describes the return value of injectComments.
Properties
Section titled “Properties”add: (
input) =>Promise<CommentThread>
Defined in: angular/src/index.ts:347
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.
Parameters
Section titled “Parameters”The thread anchor and root comment body.
anchor
Section titled “anchor”string
Returns
Section titled “Returns”Promise<CommentThread>
A promise resolving to the created thread.
getByElement()
Section titled “getByElement()”getByElement: (
elementId) =>CommentThread[]
Defined in: angular/src/index.ts:377
Returns the threads anchored to an element.
Returns the threads anchored to elementId (element or text-range
anchors).
Parameters
Section titled “Parameters”elementId
Section titled “elementId”string
The element id to filter by.
Returns
Section titled “Returns”The matching threads.
getOpen()
Section titled “getOpen()”getOpen: () =>
CommentThread[]
Defined in: angular/src/index.ts:382
Returns the unresolved threads.
Returns the unresolved threads.
Returns
Section titled “Returns”The open threads.
threads
Section titled “threads”threads:
Signal<CommentThread[]>
Defined in: angular/src/index.ts:342
Exposes the current comment threads, oldest first. Reactive: updates on any local or remote thread change.
Methods
Section titled “Methods”reopen()
Section titled “reopen()”reopen(
threadId):Promise<CommentThread>
Defined in: angular/src/index.ts:372
Reopens a resolved thread.
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
The thread to reopen.
Returns
Section titled “Returns”Promise<CommentThread>
A promise resolving to the updated thread.
reply()
Section titled “reply()”reply(
threadId,text):Promise<CommentThread>
Defined in: angular/src/index.ts:356
Appends a reply authored by the local peer to a thread.
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
The thread to reply to.
string
The reply body.
Returns
Section titled “Returns”Promise<CommentThread>
A promise resolving to the updated thread.
resolve()
Section titled “resolve()”resolve(
threadId):Promise<CommentThread>
Defined in: angular/src/index.ts:364
Marks a thread resolved.
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
The thread to resolve.
Returns
Section titled “Returns”Promise<CommentThread>
A promise resolving to the updated thread.