MCPcopy Index your code
hub / github.com/nodejs/node / updateLineCountAndPosFor

Function updateLineCountAndPosFor

test/fixtures/snapshot/typescript.js:18215–18225  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

18213 var linePos;
18214 var hasTrailingComment = false;
18215 function updateLineCountAndPosFor(s) {
18216 var lineStartsOfS = ts.computeLineStarts(s);
18217 if (lineStartsOfS.length > 1) {
18218 lineCount = lineCount + lineStartsOfS.length - 1;
18219 linePos = output.length - s.length + ts.last(lineStartsOfS);
18220 lineStart = (linePos - output.length) === 0;
18221 }
18222 else {
18223 lineStart = false;
18224 }
18225 }
18226 function writeText(s) {
18227 if (s && s.length) {
18228 if (lineStart) {

Callers 2

writeTextFunction · 0.85
rawWriteFunction · 0.85

Calls 1

lastMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…