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

Function getBaseTypeOfEnumLiteralType

test/fixtures/snapshot/typescript.js:57473–57475  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

57471 return links.enumKind = hasNonLiteralMember ? 0 /* EnumKind.Numeric */ : 1 /* EnumKind.Literal */;
57472 }
57473 function getBaseTypeOfEnumLiteralType(type) {
57474 return type.flags & 1024 /* TypeFlags.EnumLiteral */ && !(type.flags & 1048576 /* TypeFlags.Union */) ? getDeclaredTypeOfSymbol(getParentOfSymbol(type.symbol)) : type;
57475 }
57476 function getDeclaredTypeOfEnum(symbol) {
57477 var links = getSymbolLinks(symbol);
57478 if (links.declaredType) {

Callers 4

formatUnionTypesFunction · 0.85
getBaseTypeOfLiteralTypeFunction · 0.85
getWidenedLiteralTypeFunction · 0.85
isTypeSubsetOfUnionFunction · 0.85

Calls 2

getDeclaredTypeOfSymbolFunction · 0.85
getParentOfSymbolFunction · 0.85

Tested by

no test coverage detected