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

Function implementationKindDisplayParts

test/fixtures/snapshot/typescript.js:137206–137226  ·  view source on GitHub ↗
(node, checker)

Source from the content-addressed store, hash-verified

137204 }
137205 }
137206 function implementationKindDisplayParts(node, checker) {
137207 var symbol = checker.getSymbolAtLocation(ts.isDeclaration(node) && node.name ? node.name : node);
137208 if (symbol) {
137209 return getDefinitionKindAndDisplayParts(symbol, checker, node);
137210 }
137211 else if (node.kind === 205 /* SyntaxKind.ObjectLiteralExpression */) {
137212 return {
137213 kind: "interface" /* ScriptElementKind.interfaceElement */,
137214 displayParts: [ts.punctuationPart(20 /* SyntaxKind.OpenParenToken */), ts.textPart("object literal"), ts.punctuationPart(21 /* SyntaxKind.CloseParenToken */)]
137215 };
137216 }
137217 else if (node.kind === 226 /* SyntaxKind.ClassExpression */) {
137218 return {
137219 kind: "local class" /* ScriptElementKind.localClassElement */,
137220 displayParts: [ts.punctuationPart(20 /* SyntaxKind.OpenParenToken */), ts.textPart("anonymous local class"), ts.punctuationPart(21 /* SyntaxKind.CloseParenToken */)]
137221 };
137222 }
137223 else {
137224 return { kind: ts.getNodeKind(node), displayParts: [] };
137225 }
137226 }
137227 function toHighlightSpan(entry) {
137228 var documentSpan = entryToDocumentSpan(entry);
137229 if (entry.kind === 0 /* EntryKind.Span */) {

Callers 1

toImplementationLocationFunction · 0.85

Calls 1

Tested by

no test coverage detected