1 export declare class Line {
3 export declare class CodeLine extends Line {
5 constructor(contents: string);
7 export declare class MessageSubstitutionLine extends Line {
10 constructor(key: string, message: string);
12 export declare class ErrorLine extends Line {
14 constructor(startCol: number);
16 export declare class MultilineErrorLine extends ErrorLine {
17 constructor(startCol: number);
19 export declare class EndErrorLine extends ErrorLine {
22 constructor(startCol: number, endCol: number, message: string);
24 export declare const ZERO_LENGTH_ERROR = "~nil";
26 * Maps a line of text from a .lint file to an appropriate Line object
28 export declare function parseLine(text: string): Line;
30 * Maps a Line object to a matching line of text that could be in a .lint file.
31 * This is almost the inverse of parseLine.
32 * If you ran `printLine(parseLine(someText), code)`, the whitespace in the result may be different than in someText
33 * @param fileName - File name containing the line and code.
34 * @param line - A Line object to convert to text
35 * @param code - If line represents error markup, this is the line of code preceding the markup.
36 * Otherwise, this parameter is not required.
38 export declare function printLine(fileName: string, line: Line, code?: string): string | undefined;