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

Function createDetachedDiagnostic

test/fixtures/snapshot/typescript.js:19976–19992  ·  view source on GitHub ↗
(fileName, start, length, message)

Source from the content-addressed store, hash-verified

19974 }
19975 ts.getLocaleSpecificMessage = getLocaleSpecificMessage;
19976 function createDetachedDiagnostic(fileName, start, length, message) {
19977 assertDiagnosticLocation(/*file*/ undefined, start, length);
19978 var text = getLocaleSpecificMessage(message);
19979 if (arguments.length > 4) {
19980 text = formatStringFromArgs(text, arguments, 4);
19981 }
19982 return {
19983 file: undefined,
19984 start: start,
19985 length: length,
19986 messageText: text,
19987 category: message.category,
19988 code: message.code,
19989 reportsUnnecessary: message.reportsUnnecessary,
19990 fileName: fileName,
19991 };
19992 }
19993 ts.createDetachedDiagnostic = createDetachedDiagnostic;
19994 function isDiagnosticWithDetachedLocation(diagnostic) {
19995 return diagnostic.file === undefined

Callers

nothing calls this directly

Calls 3

assertDiagnosticLocationFunction · 0.85
getLocaleSpecificMessageFunction · 0.85
formatStringFromArgsFunction · 0.85

Tested by

no test coverage detected