UNPKG

@typescript/analyze-trace

Version:
15 lines (14 loc) 725 B
/// <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;