diff options
Diffstat (limited to 'node_modules/tslint/lib/rules/preferMethodSignatureRule.js')
-rw-r--r-- | node_modules/tslint/lib/rules/preferMethodSignatureRule.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node_modules/tslint/lib/rules/preferMethodSignatureRule.js b/node_modules/tslint/lib/rules/preferMethodSignatureRule.js index a3fe1e9be..4a22ff3ed 100644 --- a/node_modules/tslint/lib/rules/preferMethodSignatureRule.js +++ b/node_modules/tslint/lib/rules/preferMethodSignatureRule.js @@ -50,8 +50,8 @@ function walk(ctx) { var type = node.type; if (type !== undefined && tsutils_1.isFunctionTypeNode(type)) { ctx.addFailureAtNode(node.name, Rule.FAILURE_STRING, type.type === undefined ? undefined : [ - Lint.Replacement.deleteFromTo(Lint.childOfKind(node, ts.SyntaxKind.ColonToken).getStart(), type.getStart()), - Lint.Replacement.replaceFromTo(Lint.childOfKind(type, ts.SyntaxKind.EqualsGreaterThanToken).pos, type.type.pos, ":"), + Lint.Replacement.deleteFromTo(type.pos - 1, type.getStart()), + Lint.Replacement.replaceFromTo(type.parameters.end + 1, type.type.pos, ":"), ]); } } |