diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/tslint/lib/rules/preferMethodSignatureRule.js | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) |
update packages
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, ":"), ]); } } |