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

Function wrapSymbolTrackerToReportForContext

test/fixtures/snapshot/typescript.js:52364–52390  ·  view source on GitHub ↗
(context, tracker)

Source from the content-addressed store, hash-verified

52362 return context.encounteredError ? undefined : resultingNode;
52363 }
52364 function wrapSymbolTrackerToReportForContext(context, tracker) {
52365 var oldTrackSymbol = tracker.trackSymbol;
52366 return __assign(__assign({}, tracker), { reportCyclicStructureError: wrapReportedDiagnostic(tracker.reportCyclicStructureError), reportInaccessibleThisError: wrapReportedDiagnostic(tracker.reportInaccessibleThisError), reportInaccessibleUniqueSymbolError: wrapReportedDiagnostic(tracker.reportInaccessibleUniqueSymbolError), reportLikelyUnsafeImportRequiredError: wrapReportedDiagnostic(tracker.reportLikelyUnsafeImportRequiredError), reportNonlocalAugmentation: wrapReportedDiagnostic(tracker.reportNonlocalAugmentation), reportPrivateInBaseOfClassExpression: wrapReportedDiagnostic(tracker.reportPrivateInBaseOfClassExpression), reportNonSerializableProperty: wrapReportedDiagnostic(tracker.reportNonSerializableProperty), trackSymbol: oldTrackSymbol && (function () {
52367 var args = [];
52368 for (var _i = 0; _i < arguments.length; _i++) {
52369 args[_i] = arguments[_i];
52370 }
52371 var result = oldTrackSymbol.apply(void 0, args);
52372 if (result) {
52373 context.reportedDiagnostic = true;
52374 }
52375 return result;
52376 }) });
52377 function wrapReportedDiagnostic(method) {
52378 if (!method) {
52379 return method;
52380 }
52381 return (function () {
52382 var args = [];
52383 for (var _i = 0; _i < arguments.length; _i++) {
52384 args[_i] = arguments[_i];
52385 }
52386 context.reportedDiagnostic = true;
52387 return method.apply(void 0, args);
52388 });
52389 }
52390 }
52391 function checkTruncationLength(context) {
52392 if (context.truncating)
52393 return context.truncating;

Callers 3

withContextFunction · 0.85
cloneNodeBuilderContextFunction · 0.85

Calls 2

wrapReportedDiagnosticFunction · 0.85
applyMethod · 0.45

Tested by

no test coverage detected