@fimbul/mimir
Advanced tools
Comparing version 0.21.0-dev.20190603 to 0.21.0-dev.20190604
{ | ||
"name": "@fimbul/mimir", | ||
"version": "0.21.0-dev.20190603", | ||
"version": "0.21.0-dev.20190604", | ||
"description": "Core rules of the Fimbullinter project", | ||
@@ -33,3 +33,3 @@ "main": "recommended.yaml", | ||
"tslib": "^1.8.1", | ||
"tsutils": "^3.12.0" | ||
"tsutils": "^3.14.0" | ||
}, | ||
@@ -36,0 +36,0 @@ "peerDependencies": { |
@@ -10,3 +10,2 @@ import { TypedRule } from '@fimbul/ymir'; | ||
private printClass; | ||
private getDeclaredType; | ||
} |
@@ -82,3 +82,3 @@ "use strict"; | ||
case ts.SyntaxKind.ClassExpression: { | ||
const declaredType = this.getDeclaredType(node); | ||
const declaredType = tsutils_1.getConstructorTypeOfClassLikeDeclaration(node, this.checker); | ||
if (baseClasses.every((baseClass) => hasBase(declaredType, baseClass, typeContainsDeclaration))) | ||
@@ -95,9 +95,4 @@ return declaredType; | ||
printClass(declaration) { | ||
return this.checker.typeToString(this.getDeclaredType(declaration)); | ||
return this.checker.typeToString(tsutils_1.getConstructorTypeOfClassLikeDeclaration(declaration, this.checker)); | ||
} | ||
getDeclaredType(declaration) { | ||
return this.checker.getDeclaredTypeOfSymbol(declaration.name !== undefined | ||
? this.checker.getSymbolAtLocation(declaration.name) | ||
: this.checker.getTypeAtLocation(declaration).symbol); | ||
} | ||
}; | ||
@@ -104,0 +99,0 @@ Rule = tslib_1.__decorate([ |
@@ -138,3 +138,3 @@ "use strict"; | ||
parent.expression.getText(sourceFile) !== arrayVariable || | ||
tsutils_1.isReassignmentTarget(parent)) | ||
tsutils_1.getAccessKind(parent) & tsutils_1.AccessKind.Modification) | ||
return false; | ||
@@ -141,0 +141,0 @@ arrayAccess = true; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
414804
4871
Updatedtsutils@^3.14.0