UNPKG

627 BTypeScriptView Raw
1import { IRuleMetadata, RuleFailure, Rules } from 'tslint/lib';
2import { SourceFile } from 'typescript/lib/typescript';
3export declare class Rule extends Rules.AbstractRule {
4 static readonly metadata: IRuleMetadata;
5 static readonly DEFAULT_MAX_COMPLEXITY = 3;
6 static readonly FAILURE_STRING = "The condition complexity (cost '%s') exceeded the defined limit (cost '%s'). The conditional expression should be moved into the component.";
7 apply(sourceFile: SourceFile): RuleFailure[];
8 isEnabled(): boolean;
9}
10export declare const getFailureMessage: (totalComplexity: number, maxComplexity?: number) => string;