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

Function invocationError

test/fixtures/snapshot/typescript.js:76750–76763  ·  view source on GitHub ↗
(errorTarget, apparentType, kind, relatedInformation)

Source from the content-addressed store, hash-verified

76748 };
76749 }
76750 function invocationError(errorTarget, apparentType, kind, relatedInformation) {
76751 var _a = invocationErrorDetails(errorTarget, apparentType, kind), messageChain = _a.messageChain, relatedInfo = _a.relatedMessage;
76752 var diagnostic = ts.createDiagnosticForNodeFromMessageChain(errorTarget, messageChain);
76753 if (relatedInfo) {
76754 ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(errorTarget, relatedInfo));
76755 }
76756 if (ts.isCallExpression(errorTarget.parent)) {
76757 var _b = getDiagnosticSpanForCallNode(errorTarget.parent, /* doNotIncludeArguments */ true), start = _b.start, length_8 = _b.length;
76758 diagnostic.start = start;
76759 diagnostic.length = length_8;
76760 }
76761 diagnostics.add(diagnostic);
76762 invocationErrorRecovery(apparentType, kind, relatedInformation ? ts.addRelatedInfo(diagnostic, relatedInformation) : diagnostic);
76763 }
76764 function invocationErrorRecovery(apparentType, kind, diagnostic) {
76765 if (!apparentType.symbol) {
76766 return;

Callers 3

resolveCallExpressionFunction · 0.85
resolveNewExpressionFunction · 0.85

Calls 4

invocationErrorDetailsFunction · 0.85
invocationErrorRecoveryFunction · 0.85
addMethod · 0.65

Tested by

no test coverage detected