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

Function getTypeAliasForTypeLiteral

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

Source from the content-addressed store, hash-verified

55387 return "public";
55388 }
55389 function getTypeAliasForTypeLiteral(type) {
55390 if (type.symbol && type.symbol.flags & 2048 /* SymbolFlags.TypeLiteral */ && type.symbol.declarations) {
55391 var node = ts.walkUpParenthesizedTypes(type.symbol.declarations[0].parent);
55392 if (node.kind === 259 /* SyntaxKind.TypeAliasDeclaration */) {
55393 return getSymbolOfNode(node);
55394 }
55395 }
55396 return undefined;
55397 }
55398 function isTopLevelInExternalModuleAugmentation(node) {
55399 return node && node.parent &&
55400 node.parent.kind === 262 /* SyntaxKind.ModuleBlock */ &&

Callers 1

createAnonymousTypeNodeFunction · 0.85

Calls 1

getSymbolOfNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…