Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
bfacfb93
Commit
bfacfb93
authored
Nov 08, 2021
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing types in sidebar/helpers/thread.js
parent
4fd435b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
thread.js
src/sidebar/helpers/thread.js
+5
-0
No files found.
src/sidebar/helpers/thread.js
View file @
bfacfb93
...
@@ -22,6 +22,8 @@ function countByVisibility(thread, visibility) {
...
@@ -22,6 +22,8 @@ function countByVisibility(thread, visibility) {
/**
/**
* Count the hidden annotations/replies in the `thread`
* Count the hidden annotations/replies in the `thread`
*
* @param {Thread} thread
*/
*/
export
function
countHidden
(
thread
)
{
export
function
countHidden
(
thread
)
{
return
countByVisibility
(
thread
,
false
);
return
countByVisibility
(
thread
,
false
);
...
@@ -29,6 +31,8 @@ export function countHidden(thread) {
...
@@ -29,6 +31,8 @@ export function countHidden(thread) {
/**
/**
* Count the visible annotations/replies in the `thread`
* Count the visible annotations/replies in the `thread`
*
* @param {Thread} thread
*/
*/
export
function
countVisible
(
thread
)
{
export
function
countVisible
(
thread
)
{
return
countByVisibility
(
thread
,
true
);
return
countByVisibility
(
thread
,
true
);
...
@@ -76,6 +80,7 @@ export function rootAnnotations(threads) {
...
@@ -76,6 +80,7 @@ export function rootAnnotations(threads) {
}
}
// Else, search across all children at once (an entire hierarchical level)
// Else, search across all children at once (an entire hierarchical level)
/** @type {Thread[]} */
const
allChildren
=
[];
const
allChildren
=
[];
threads
.
forEach
(
thread
=>
{
threads
.
forEach
(
thread
=>
{
if
(
thread
.
children
)
{
if
(
thread
.
children
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment