Skip to content

Commit

Permalink
fix(unused): Fix #13.
Browse files Browse the repository at this point in the history
Closes #13.
  • Loading branch information
cartant committed Mar 28, 2019
1 parent 4d78c59 commit 2235987
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/rules/noUnusedDeclarationRule.ts
Expand Up @@ -332,7 +332,9 @@ export class Walker extends Lint.ProgramAwareRuleWalker {

function getIdentifier(node: ts.Declaration): ts.Identifier {

return node["name"];
return tsutils.isIdentifier(node)
? node
: node["name"];
}

function isUnaryPrefixOrPostfix(node: ts.Node): boolean {
Expand Down

0 comments on commit 2235987

Please sign in to comment.