1 | import * as Lint from 'tslint';
|
2 | export declare module TestHelper {
|
3 | let RULES_DIRECTORY: string;
|
4 | let FORMATTER_DIRECTORY: string;
|
5 | let FILE_ENCODING: string;
|
6 | interface FailurePosition {
|
7 | character: number;
|
8 | line: number;
|
9 | position?: number;
|
10 | }
|
11 | interface Fix {
|
12 | innerStart: number;
|
13 | innerLength: number;
|
14 | innerText: string;
|
15 | }
|
16 | interface ExpectedFailure {
|
17 | ruleName: string;
|
18 | name: string;
|
19 | failure?: string;
|
20 | ruleSeverity?: string;
|
21 | endPosition?: FailurePosition;
|
22 | startPosition: FailurePosition;
|
23 | fix?: Fix;
|
24 | }
|
25 | function assertNoViolation(ruleName: string, inputFileOrScript: string, useTypeChecker?: boolean): void;
|
26 | function assertNoViolationWithOptions(ruleName: string, options: any[], inputFileOrScript: string, useTypeChecker?: boolean): void;
|
27 | function assertViolationsWithOptions(ruleName: string, options: any[], inputFileOrScript: string, expectedFailures: ExpectedFailure[], useTypeChecker?: boolean): void;
|
28 | function assertViolations(ruleName: string, inputFileOrScript: string, expectedFailures: ExpectedFailure[], useTypeChecker?: boolean): void;
|
29 | function assertViolationsWithTypeChecker(ruleName: string, inputFileOrScript: string, expectedFailures: ExpectedFailure[]): void;
|
30 | function runRule(ruleName: string, userOptions: string[], inputFileOrScript: string, useTypeChecker?: boolean): Lint.LintResult;
|
31 | }
|