@fimbul/mimir
Advanced tools
Comparing version 0.7.0-dev.20180326 to 0.7.0-dev.20180327
{ | ||
"name": "@fimbul/mimir", | ||
"version": "0.7.0-dev.20180326", | ||
"version": "0.7.0-dev.20180327", | ||
"description": "Core rules of the Fimbullinter project", | ||
@@ -32,3 +32,3 @@ "main": "recommended.yaml", | ||
"tslib": "^1.8.1", | ||
"tsutils": "^2.22.2" | ||
"tsutils": "^2.24.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "peerDependencies": { |
import { TypedRule } from '@fimbul/ymir'; | ||
export declare class Rule extends TypedRule { | ||
apply(): void; | ||
private iterate; | ||
private visitNode; | ||
private iterate(wrap, end); | ||
private visitNode(wrap); | ||
} |
import { TypedRule } from '@fimbul/ymir'; | ||
export declare class Rule extends TypedRule { | ||
apply(): void; | ||
private isPromiseLike; | ||
private isThenable; | ||
private isAsyncIterable; | ||
private hasSymbolAsyncIterator; | ||
private isPromiseLike(node); | ||
private isThenable(type, node); | ||
private isAsyncIterable(node); | ||
private hasSymbolAsyncIterator(type); | ||
} |
@@ -5,6 +5,6 @@ import { AbstractRule } from '@fimbul/ymir'; | ||
apply(): void; | ||
private iterate; | ||
private visitNode; | ||
private shouldFail; | ||
private fail; | ||
private iterate(wrap, end); | ||
private visitNode(wrap); | ||
private shouldFail(); | ||
private fail({asteriskToken, name}); | ||
} |
import { AbstractRule } from '@fimbul/ymir'; | ||
export declare class Rule extends AbstractRule { | ||
apply(): void; | ||
private getLiteralValue; | ||
private getLiteralValue(node, cb); | ||
} |
@@ -5,8 +5,8 @@ import { TypedRule } from '@fimbul/ymir'; | ||
apply(): void; | ||
private checkCallExpression; | ||
private checkNewExpression; | ||
private checkSignature; | ||
private checkInferredTypeParameters; | ||
private scannerFallback; | ||
private handleEmptyTypeParameter; | ||
private checkCallExpression(node); | ||
private checkNewExpression(node); | ||
private checkSignature(signature, declaration, node); | ||
private checkInferredTypeParameters(signature, typeParameters, node); | ||
private scannerFallback(signature, typeParameters, node); | ||
private handleEmptyTypeParameter(typeParameter, node); | ||
} |
@@ -5,4 +5,4 @@ import { AbstractRule } from '@fimbul/ymir'; | ||
apply(): void; | ||
private checkTypeParameters; | ||
private isConstrainedByOtherTypeParameter; | ||
private checkTypeParameters(typeParameters, signature); | ||
private isConstrainedByOtherTypeParameter(current, all); | ||
} |
import { AbstractRule } from '@fimbul/ymir'; | ||
export declare class Rule extends AbstractRule { | ||
apply(): void; | ||
private checkBlock; | ||
private checkIfStatement; | ||
private checkConstantIterationCondition; | ||
private report; | ||
private checkBlock(node); | ||
private checkIfStatement(node); | ||
private checkConstantIterationCondition(node); | ||
private report(node); | ||
} |
import { TypedRule } from '@fimbul/ymir'; | ||
export declare class Rule extends TypedRule { | ||
apply(): void; | ||
private checkObjectDestructuring; | ||
private checkSignature; | ||
private checkObjectBindingPattern; | ||
private checkElementAccess; | ||
private checkDynamicPropertyAccess; | ||
private checkSymbol; | ||
private checkStability; | ||
private checkObjectDestructuring(node); | ||
private checkSignature(node); | ||
private checkObjectBindingPattern(node); | ||
private checkElementAccess(node); | ||
private checkDynamicPropertyAccess(type, keyType, node); | ||
private checkSymbol(symbol, node, name); | ||
private checkStability<T, U, V>(s, node, hint, descr); | ||
} |
@@ -11,4 +11,4 @@ import { ConfigurableRule } from '@fimbul/ymir'; | ||
apply(): void; | ||
private checkNode; | ||
private isUsed; | ||
private checkNode(expr, errorNode?); | ||
private isUsed(node); | ||
} |
@@ -5,5 +5,5 @@ import { AbstractRule } from '@fimbul/ymir'; | ||
apply(): void; | ||
private iterate; | ||
private visitNode; | ||
private fail; | ||
private iterate(wrap, end); | ||
private visitNode(wrap); | ||
private fail(statement); | ||
} |
@@ -5,7 +5,7 @@ import { TypedRule } from '@fimbul/ymir'; | ||
apply(): void; | ||
private checkDefiniteAssignmentAssertion; | ||
private checkDefiniteAssignmentAssertionProperty; | ||
private checkNonNullAssertion; | ||
private checkTypeAssertion; | ||
private getSafeContextualType; | ||
private checkDefiniteAssignmentAssertion(node); | ||
private checkDefiniteAssignmentAssertionProperty(node); | ||
private checkNonNullAssertion(node); | ||
private checkTypeAssertion(node); | ||
private getSafeContextualType(node); | ||
} |
import { AbstractRule } from '@fimbul/ymir'; | ||
export declare class Rule extends AbstractRule { | ||
apply(): void; | ||
private checkFunctionParameters; | ||
private fail; | ||
private removeUndefinedFromType; | ||
private checkFunctionParameters(parameters); | ||
private fail(node, makeOptional?); | ||
private removeUndefinedFromType(type); | ||
} |
@@ -5,11 +5,11 @@ import { TypedRule } from '@fimbul/ymir'; | ||
apply(): void; | ||
private checkSwitch; | ||
private checkCondition; | ||
private checkNode; | ||
private maybeFail; | ||
private isTruthyFalsy; | ||
private isConstantComparison; | ||
private checkEquals; | ||
private nullAwarePredicate; | ||
private executePredicate; | ||
private checkSwitch(node); | ||
private checkCondition(node); | ||
private checkNode(node); | ||
private maybeFail(node, result); | ||
private isTruthyFalsy(node); | ||
private isConstantComparison(left, right, operator); | ||
private checkEquals(left, right, equals); | ||
private nullAwarePredicate(type, predicate); | ||
private executePredicate(type, predicate); | ||
} |
@@ -34,3 +34,3 @@ "use strict"; | ||
continue; | ||
const canBeConst = (declaration.initializer !== undefined || isForInOrOfStatement(parent.parent)) && | ||
const canBeConst = (declaration.initializer !== undefined || tsutils_1.isForInOrOfStatement(parent.parent)) && | ||
variableInfo.uses.every(noReassignment) && | ||
@@ -132,5 +132,2 @@ (kind === 1 || | ||
} | ||
function isForInOrOfStatement(node) { | ||
return node.kind === ts.SyntaxKind.ForOfStatement || node.kind === ts.SyntaxKind.ForInStatement; | ||
} | ||
function noReassignment(use) { | ||
@@ -137,0 +134,0 @@ return (use.domain & 4) === 0 || !tsutils_1.isReassignmentTarget(use.location); |
@@ -5,7 +5,7 @@ import { TypedRule } from '@fimbul/ymir'; | ||
apply(): void; | ||
private checkForStatement; | ||
private isIterationPossible; | ||
private isIterationProtocolAvailable; | ||
private isArray; | ||
private isDeclaredInDefaultLib; | ||
private checkForStatement(node); | ||
private isIterationPossible(type); | ||
private isIterationProtocolAvailable(); | ||
private isArray(type); | ||
private isDeclaredInDefaultLib(node); | ||
} |
@@ -6,3 +6,3 @@ import { TypedRule, RuleSupportsContext } from '@fimbul/ymir'; | ||
apply(): void; | ||
private isNumberLikeType; | ||
private isNumberLikeType(type); | ||
} |
import { TypedRule } from '@fimbul/ymir'; | ||
export declare class Rule extends TypedRule { | ||
apply(): void; | ||
private isSpreadableObject; | ||
private isSpreadableObject(node); | ||
} |
@@ -5,4 +5,4 @@ import { TypedRule } from '@fimbul/ymir'; | ||
apply(): void; | ||
private visitStatement; | ||
private checkReturnExpression; | ||
private visitStatement(node); | ||
private checkReturnExpression(node); | ||
} |
import { TypedRule } from '@fimbul/ymir'; | ||
export declare class Rule extends TypedRule { | ||
apply(): void; | ||
private addDiagnostic; | ||
private addDiagnostic(diagnostic); | ||
} |
Sorry, the diff of this file is not supported yet
225046
2646
Updatedtsutils@^2.24.0