Skip to content
This repository was archived by the owner on Feb 21, 2022. It is now read-only.

Commit d163eb5

Browse files
authored
Merge pull request #173 from Cinergix/fix-ts-build-errors
Fix typescript build errors
2 parents 104f5d7 + bb2edb9 commit d163eb5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/rules/terArrowBodyStyleRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class RuleWalker extends Lint.RuleWalker {
9898
this.requireReturnForObjectLiteral = opt[1] && opt[1].requireReturnForObjectLiteral;
9999
}
100100

101-
protected visitArrowFunction(node: ts.FunctionLikeDeclaration) {
101+
protected visitArrowFunction(node: ts.ArrowFunction): void {
102102
const arrowBody = node.body;
103103
if (arrowBody.kind === ts.SyntaxKind.Block) {
104104
const blockBody = (arrowBody as ts.Block).statements;

src/rules/terArrowParensRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class RuleWalker extends Lint.RuleWalker {
9191
this.requireForBlockBody = this.asNeeded && opt[1] && opt[1].requireForBlockBody === true;
9292
}
9393

94-
protected visitArrowFunction(node: ts.FunctionLikeDeclaration) {
94+
protected visitArrowFunction(node: ts.ArrowFunction): void {
9595
super.visitArrowFunction(node);
9696

9797
if (node.parameters.length === 1) {

src/rules/terMaxLenRule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@ class MaxLenWalker extends Lint.SkippableTokenAwareRuleWalker {
304304
Lint.scanAllTokens(ts.createScanner(ts.ScriptTarget.ES5, false, ts.LanguageVariant.Standard, node.text), (scanner: ts.Scanner) => {
305305
const token = scanner.getToken();
306306
const startPos = scanner.getStartPos();
307-
if (this.tokensToSkipStartEndMap[startPos]) {
307+
if (this.getSkipEndFromStart(startPos)) {
308308
// tokens to skip are places where the scanner gets confused about what the token is, without the proper context
309309
// (specifically, regex, identifiers, and templates). So skip those tokens.
310-
scanner.setTextPos(this.tokensToSkipStartEndMap[startPos]);
310+
scanner.setTextPos(this.getSkipEndFromStart(startPos));
311311
return;
312312
}
313313

0 commit comments

Comments
 (0)