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

Function getExpandoSymbol

test/fixtures/snapshot/typescript.js:51131–51143  ·  view source on GitHub ↗

* Get the real symbol of a declaration with an expando initializer. * * Normally, declarations have an associated symbol, but when a declaration has an expando * initializer, the expando's symbol is the one that has all the members merged into it.

(symbol)

Source from the content-addressed store, hash-verified

51129 * initializer, the expando's symbol is the one that has all the members merged into it.
51130 */
51131 function getExpandoSymbol(symbol) {
51132 var decl = symbol.valueDeclaration;
51133 if (!decl || !ts.isInJSFile(decl) || symbol.flags & 524288 /* SymbolFlags.TypeAlias */ || ts.getExpandoInitializer(decl, /*isPrototypeAssignment*/ false)) {
51134 return undefined;
51135 }
51136 var init = ts.isVariableDeclaration(decl) ? ts.getDeclaredExpandoInitializer(decl) : ts.getAssignedExpandoInitializer(decl);
51137 if (init) {
51138 var initSymbol = getSymbolOfNode(init);
51139 if (initSymbol) {
51140 return mergeJSSymbols(initSymbol, symbol);
51141 }
51142 }
51143 }
51144 function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) {
51145 var isClassic = ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Classic;
51146 var errorMessage = isClassic ?

Callers 1

getTypeReferenceTypeFunction · 0.85

Calls 2

getSymbolOfNodeFunction · 0.85
mergeJSSymbolsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…