Skip to content

Commit

Permalink
jsdoc: Document ListItem.identicalTo()
Browse files Browse the repository at this point in the history
  • Loading branch information
claremacrae committed Oct 18, 2024
1 parent aeed58c commit 3d51640
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Task/ListItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ export class ListItem {
return this.parent === null;
}

/**
* Compare all the fields in another ListItem, to detect any differences from this one.
*
* If any field is different in any way, it will return false.
*
* @note Use {@link Task.identicalTo} to compare {@link Task} objects.
*
* @param other - if this is in fact a {@link Task}, the result of false.
*/
identicalTo(other: ListItem) {
if (this.constructor.name !== other.constructor.name) {
return false;
Expand Down

0 comments on commit 3d51640

Please sign in to comment.