MCPcopy Create free account
hub / github.com/nodejs/node / insertLeadingSemicolonIfNeeded

Function insertLeadingSemicolonIfNeeded

test/fixtures/snapshot/typescript.js:150625–150630  ·  view source on GitHub ↗
(changeTracker, beforeNode, sourceFile)

Source from the content-addressed store, hash-verified

150623 }
150624 }
150625 function insertLeadingSemicolonIfNeeded(changeTracker, beforeNode, sourceFile) {
150626 var precedingToken = ts.findPrecedingToken(beforeNode.pos, sourceFile);
150627 if (precedingToken && ts.positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) {
150628 changeTracker.insertText(sourceFile, beforeNode.getStart(sourceFile), ";");
150629 }
150630 }
150631 })(codefix = ts.codefix || (ts.codefix = {}));
150632})(ts || (ts = {}));
150633/* @internal */

Callers 1

makeChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected