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

Function errorOrSuggestion

test/fixtures/snapshot/typescript.js:49029–49041  ·  view source on GitHub ↗
(isError, location, message, arg0, arg1, arg2, arg3)

Source from the content-addressed store, hash-verified

49027 }
49028 }
49029 function errorOrSuggestion(isError, location, message, arg0, arg1, arg2, arg3) {
49030 // Pseudo-synthesized input node
49031 if (location.pos < 0 || location.end < 0) {
49032 if (!isError) {
49033 return; // Drop suggestions (we have no span to suggest on)
49034 }
49035 // Issue errors globally
49036 var file = ts.getSourceFileOfNode(location);
49037 addErrorOrSuggestion(isError, "message" in message ? ts.createFileDiagnostic(file, 0, 0, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForFileFromMessageChain(file, message)); // eslint-disable-line no-in-operator
49038 return;
49039 }
49040 addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message)); // eslint-disable-line no-in-operator
49041 }
49042 function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, arg0, arg1, arg2, arg3) {
49043 var diagnostic = error(location, message, arg0, arg1, arg2, arg3);
49044 if (maybeMissingAwait) {

Callers 6

resolveNameHelperFunction · 0.85
errorOnImplicitAnyModuleFunction · 0.85
getTypeOfAccessorsFunction · 0.85
reportImplicitAnyFunction · 0.85
checkSourceElementWorkerFunction · 0.85

Calls 1

addErrorOrSuggestionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…