Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e39b0c7

Browse files
committed
JavaScript: address comments
1 parent 4f4ad2b commit e39b0c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

javascript/ql/src/Expressions/SelfAssignment.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ where e.same(_) and
4444
) and
4545
// exclude DOM properties
4646
not isDOMProperty(e.(PropAccess).getPropertyName()) and
47-
// exclude self-assignments with a JSDoc comment
48-
not exists(e.getAssignment().getParent().(ExprStmt).getDocumentation().getATag())
47+
// exclude self-assignments that have been inserted to satisfy the TypeScript JS-checker
48+
not e.getAssignment().getParent().(ExprStmt).getDocumentation().getATag().getTitle() = "type"
4949
select e.getParent(), "This expression assigns " + dsc + " to itself."

0 commit comments

Comments
 (0)