Commit bfacfb93 authored by Robert Knight's avatar Robert Knight

Add missing types in sidebar/helpers/thread.js

parent 4fd435b8
......@@ -22,6 +22,8 @@ function countByVisibility(thread, visibility) {
/**
* Count the hidden annotations/replies in the `thread`
*
* @param {Thread} thread
*/
export function countHidden(thread) {
return countByVisibility(thread, false);
......@@ -29,6 +31,8 @@ export function countHidden(thread) {
/**
* Count the visible annotations/replies in the `thread`
*
* @param {Thread} thread
*/
export function countVisible(thread) {
return countByVisibility(thread, true);
......@@ -76,6 +80,7 @@ export function rootAnnotations(threads) {
}
// Else, search across all children at once (an entire hierarchical level)
/** @type {Thread[]} */
const allChildren = [];
threads.forEach(thread => {
if (thread.children) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment