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

Function shouldGetType

test/fixtures/snapshot/typescript.js:165333–165351  ·  view source on GitHub ↗
(sourceFile, node, position)

Source from the content-addressed store, hash-verified

165331 return node;
165332 }
165333 function shouldGetType(sourceFile, node, position) {
165334 switch (node.kind) {
165335 case 79 /* SyntaxKind.Identifier */:
165336 return !ts.isLabelName(node) && !ts.isTagName(node) && !ts.isConstTypeReference(node.parent);
165337 case 206 /* SyntaxKind.PropertyAccessExpression */:
165338 case 161 /* SyntaxKind.QualifiedName */:
165339 // Don't return quickInfo if inside the comment in `a/**/.b`
165340 return !ts.isInComment(sourceFile, position);
165341 case 108 /* SyntaxKind.ThisKeyword */:
165342 case 192 /* SyntaxKind.ThisType */:
165343 case 106 /* SyntaxKind.SuperKeyword */:
165344 case 197 /* SyntaxKind.NamedTupleMember */:
165345 return true;
165346 case 231 /* SyntaxKind.MetaProperty */:
165347 return ts.isImportMeta(node);
165348 default:
165349 return false;
165350 }
165351 }
165352 /// Goto definition
165353 function getDefinitionAtPosition(fileName, position, searchOtherFilesOnly, stopAtAlias) {
165354 synchronizeHostData();

Callers 1

getQuickInfoAtPositionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected