Creates a comment list.
The object this list is collecting comments of. Either a page if this list is collecting its comments, or a comment if this list is collecting its replies.
The (flat) count of comments belonging into this list.
Fired when this list’s #count changed.
Fired when this list’s #deepCount changed.
Fired when this list’s #length changed.
Fired when a new comment arrives in this index.
The number of comments known to belong in this list. May differ from this list’s #length.
The number of comments known to belong in this list, recursively including replies.
The number of comments in this list.
Queries the comment with the provided id
.
Id of a comment in this list.
The comment with the provided id
, or undefined
if there is no such comment in this list.
Updates the comments in this list from the server.
A promise that will be resolved with this
list when the update succeeded.
Updates the count (number of comments excluding replies) of this list. Calling this method will not change this list’s content.
A promise that will be resolved with the deep count when its retrieval succeeded.
Updates the deep count (number of comments including replies) of this list. Calling this method will not change this list’s content.
A promise that will be resolved with the deep count when its retrieval succeeded.
Transforms this
comment list together with the comments’ replies into an array using the provided
transformer
.
A function mapping each comment to the desired value.
The array containing the result of transforming each comment in this list. The returned array will have the transformed values in the same order as the source comments were in this list. Replies come directly after their parent.
Transforms this
comment list into an array using the provided transformer
.
A function mapping each comment in this list to the desired value.
The array containing the result of transforming each comment in this list. The returned array will have the transformed values in the same order as the source comment were in this list.
Sort this list using the provided criterion
in the provided mode
. The list will be kept sorted during any
updates until the next call to this method or #sortBys. If the provided criterion
decides for two
comments to be equal, their creation date will be used in ascending order to sort them.
The criterion to sort this list by.
The sort direction to use.
Sort this list using multiple criteria, potentially in different modes. The list will be kept sorted during any updates until the next call to this method or (#sortBy)[#sortby]. For a pair of comments, the first provided sort method will be used to decide their order. Only if that method decides the comments to be equal, the next method will be used. If all of the provided criteria decide the comments to be equal, their creation date will be used in ascending order to sort them.
The sort methods to use, in order of their presedence.
Generated using TypeDoc
A list of comments. Offers the ability to query and update the comments in this list. The list’s
count
, the number of comments known by the server to belong into this list, can be queried independently.A list contains only comments that either are published or are deleted but still have replies.