@typescript/analyze-trace
Version:
Analyze the output of tsc --generatetrace
15 lines (14 loc) • 725 B
TypeScript
/// <reference types="node" />
import stream = require("stream");
declare namespace normalizePositions {
type LineChar = readonly [line: number, char: number];
}
declare type LineChar = normalizePositions.LineChar;
/**
* @param stream A stream of string chunks with respect to which `positions` should be normalized.
* @param positions Positions to be normalized. NB: negative numbers will be treated as positions
* that should be converted to line-char without but not moved past trivia.
* @returns A list of normalized line-char positions.
*/
declare function normalizePositions(stream: stream.Readable, positions: ReadonlyArray<number | LineChar>): Promise<ReadonlyArray<LineChar>>;
export = normalizePositions;