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

Function getClassElementPropertyKeyType

test/fixtures/snapshot/typescript.js:86679–86693  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

86677 : getDeclaredTypeOfSymbol(classSymbol);
86678 }
86679 function getClassElementPropertyKeyType(element) {
86680 var name = element.name;
86681 switch (name.kind) {
86682 case 79 /* SyntaxKind.Identifier */:
86683 return getStringLiteralType(ts.idText(name));
86684 case 8 /* SyntaxKind.NumericLiteral */:
86685 case 10 /* SyntaxKind.StringLiteral */:
86686 return getStringLiteralType(name.text);
86687 case 162 /* SyntaxKind.ComputedPropertyName */:
86688 var nameType = checkComputedPropertyName(name);
86689 return isTypeAssignableToKind(nameType, 12288 /* TypeFlags.ESSymbolLike */) ? nameType : stringType;
86690 default:
86691 return ts.Debug.fail("Unsupported property name.");
86692 }
86693 }
86694 // Return the list of properties of the given type, augmented with properties from Function
86695 // if the type has call or construct signatures
86696 function getAugmentedPropertiesOfType(type) {

Callers 1

Calls 4

getStringLiteralTypeFunction · 0.85
isTypeAssignableToKindFunction · 0.85
failMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…