import * as ts from "typescript"; import { TreeVisitor } from "./visitor"; import * as tslint from "tslint"; export declare class SonarRuleVisitor extends TreeVisitor { private ruleName; private issues; constructor(ruleName: string); getIssues(): tslint.RuleFailure[]; addIssue(node: ts.Node, message: string): SonarIssue; addIssueAtLocation(primaryLocation: IssueLocation): SonarIssue; } export declare class TypedSonarRuleVisitor extends SonarRuleVisitor { protected program: ts.Program; constructor(ruleName: string, program: ts.Program); } export declare class IssueLocation { readonly start: number; readonly end: number; readonly sourceFile: ts.SourceFile; message?: string | undefined; readonly startLine: number; readonly startColumn: number; readonly endLine: number; readonly endColumn: number; constructor(start: number, end: number, sourceFile: ts.SourceFile, message?: string | undefined); toJson(): { startLine: number; startCol: number; endLine: number; endCol: number; message: string | undefined; }; } export declare function getIssueLocationAtNode(node: ts.Node, message?: string): IssueLocation; export declare class SonarIssue extends tslint.RuleFailure { private cost?; readonly primaryLocation: IssueLocation; private secondaryLocations; constructor(primaryLocation: IssueLocation, ruleName: string); toJson(): { failure: string; startPosition: { line: number; character: number; position: number; }; endPosition: { line: number; character: number; position: number; }; name: string; ruleName: string; cost: number | undefined; secondaryLocations: { startLine: number; startCol: number; endLine: number; endCol: number; message: string | undefined; }[]; ruleSeverity: tslint.RuleSeverity; }; setCost(cost: number): SonarIssue; addSecondaryLocation(node: ts.Node, message?: string): SonarIssue; addSecondaryLocation(secondaryLocation: IssueLocation): SonarIssue; getSecondaryLocations(): IssueLocation[]; getCost(): number | undefined; }