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

Function getRefactorContext

test/fixtures/snapshot/typescript.js:166025–166039  ·  view source on GitHub ↗
(file, positionOrRange, preferences, formatOptions, triggerReason, kind)

Source from the content-addressed store, hash-verified

166023 return ts.Rename.getRenameInfo(program, getValidSourceFile(fileName), position, options);
166024 }
166025 function getRefactorContext(file, positionOrRange, preferences, formatOptions, triggerReason, kind) {
166026 var _a = typeof positionOrRange === "number" ? [positionOrRange, undefined] : [positionOrRange.pos, positionOrRange.end], startPosition = _a[0], endPosition = _a[1];
166027 return {
166028 file: file,
166029 startPosition: startPosition,
166030 endPosition: endPosition,
166031 program: getProgram(),
166032 host: host,
166033 formatContext: ts.formatting.getFormatContext(formatOptions, host),
166034 cancellationToken: cancellationToken,
166035 preferences: preferences,
166036 triggerReason: triggerReason,
166037 kind: kind
166038 };
166039 }
166040 function getInlayHintsContext(file, span, preferences) {
166041 return {
166042 file: file,

Callers 2

getApplicableRefactorsFunction · 0.85
getEditsForRefactorFunction · 0.85

Calls 1

getProgramFunction · 0.85

Tested by

no test coverage detected