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

Function tryGetDeclaredTypeOfSymbol

test/fixtures/snapshot/typescript.js:57532–57552  ·  view source on GitHub ↗
(symbol)

Source from the content-addressed store, hash-verified

57530 return tryGetDeclaredTypeOfSymbol(symbol) || errorType;
57531 }
57532 function tryGetDeclaredTypeOfSymbol(symbol) {
57533 if (symbol.flags & (32 /* SymbolFlags.Class */ | 64 /* SymbolFlags.Interface */)) {
57534 return getDeclaredTypeOfClassOrInterface(symbol);
57535 }
57536 if (symbol.flags & 524288 /* SymbolFlags.TypeAlias */) {
57537 return getDeclaredTypeOfTypeAlias(symbol);
57538 }
57539 if (symbol.flags & 262144 /* SymbolFlags.TypeParameter */) {
57540 return getDeclaredTypeOfTypeParameter(symbol);
57541 }
57542 if (symbol.flags & 384 /* SymbolFlags.Enum */) {
57543 return getDeclaredTypeOfEnum(symbol);
57544 }
57545 if (symbol.flags & 8 /* SymbolFlags.EnumMember */) {
57546 return getDeclaredTypeOfEnumMember(symbol);
57547 }
57548 if (symbol.flags & 2097152 /* SymbolFlags.Alias */) {
57549 return getDeclaredTypeOfAlias(symbol);
57550 }
57551 return undefined;
57552 }
57553 /**
57554 * A type is free of this references if it's the any, string, number, boolean, symbol, or void keyword, a string
57555 * literal type, an array with an element type that is free of this references, or a type reference that is

Callers 2

getDeclaredTypeOfSymbolFunction · 0.85
getTypeReferenceTypeFunction · 0.85

Tested by

no test coverage detected