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

Function getApplicableRefactors

test/fixtures/snapshot/typescript.js:150224–150231  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

150222 }
150223 refactor_1.registerRefactor = registerRefactor;
150224 function getApplicableRefactors(context) {
150225 return ts.arrayFrom(ts.flatMapIterator(refactors.values(), function (refactor) {
150226 var _a;
150227 return context.cancellationToken && context.cancellationToken.isCancellationRequested() ||
150228 !((_a = refactor.kinds) === null || _a === void 0 ? void 0 : _a.some(function (kind) { return refactor_1.refactorKindBeginsWith(kind, context.kind); })) ? undefined :
150229 refactor.getAvailableActions(context);
150230 }));
150231 }
150232 refactor_1.getApplicableRefactors = getApplicableRefactors;
150233 function getEditsForRefactor(context, refactorName, actionName) {
150234 var refactor = refactors.get(refactorName);

Callers

nothing calls this directly

Calls 5

synchronizeHostDataFunction · 0.85
getValidSourceFileFunction · 0.85
getRefactorContextFunction · 0.85
someMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected