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

Function getLiteralTypeFromPropertyName

test/fixtures/snapshot/typescript.js:61818–61824  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

61816 }
61817 }
61818 function getLiteralTypeFromPropertyName(name) {
61819 if (ts.isPrivateIdentifier(name)) {
61820 return neverType;
61821 }
61822 return ts.isIdentifier(name) ? getStringLiteralType(ts.unescapeLeadingUnderscores(name.escapedText)) :
61823 getRegularTypeOfLiteralType(ts.isComputedPropertyName(name) ? checkComputedPropertyName(name) : checkExpression(name));
61824 }
61825 function getLiteralTypeFromProperty(prop, include, includeNonPublic) {
61826 if (includeNonPublic || !(ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 /* ModifierFlags.NonPublicAccessibilityModifier */)) {
61827 var type = getSymbolLinks(getLateBoundSymbol(prop)).nameType;

Calls 4

getStringLiteralTypeFunction · 0.85
checkExpressionFunction · 0.70

Tested by

no test coverage detected