Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private static tsMark(position: number, file: ts.SourceFile, note: string | null = null): Mark {
const {line, character} = file.getLineAndCharacterOfPosition(position);
return Mark.at(position, line + 1, character + 1, note);
}
private static tslinkMark(pos: tslint.RuleFailurePosition, shift: number = 0, note: string | null = null): Mark {
const position = pos.getPosition();
const {line, character} = pos.getLineAndCharacter();
return Mark.at(position + shift, line + 1, character + shift + 1, note);
}
private static tsMark(position: number, file: ts.SourceFile, note: string | null = null): Mark {
const {line, character} = file.getLineAndCharacterOfPosition(position);
return Mark.at(position, line + 1, character + 1, note);
}
private static tslinkMark(pos: tslint.RuleFailurePosition, shift: number = 0, note: string | null = null): Mark {
const position = pos.getPosition();
const {line, character} = pos.getLineAndCharacter();
return Mark.at(position + shift, line + 1, character + shift + 1, note);
}