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

Function addDeprecatedSuggestionWorker

test/fixtures/snapshot/typescript.js:49050–49058  ·  view source on GitHub ↗
(declarations, diagnostic)

Source from the content-addressed store, hash-verified

49048 return diagnostic;
49049 }
49050 function addDeprecatedSuggestionWorker(declarations, diagnostic) {
49051 var deprecatedTag = Array.isArray(declarations) ? ts.forEach(declarations, ts.getJSDocDeprecatedTag) : ts.getJSDocDeprecatedTag(declarations);
49052 if (deprecatedTag) {
49053 ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(deprecatedTag, ts.Diagnostics.The_declaration_was_marked_as_deprecated_here));
49054 }
49055 // We call `addRelatedInfo()` before adding the diagnostic to prevent duplicates.
49056 suggestionDiagnostics.add(diagnostic);
49057 return diagnostic;
49058 }
49059 function isDeprecatedSymbol(symbol) {
49060 return !!(getDeclarationNodeFlagsFromSymbol(symbol) & 268435456 /* NodeFlags.Deprecated */);
49061 }

Callers 2

addDeprecatedSuggestionFunction · 0.85

Calls 2

forEachMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected