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

Function maybeMappedType

test/fixtures/snapshot/typescript.js:50257–50266  ·  view source on GitHub ↗
(node, symbol)

Source from the content-addressed store, hash-verified

50255 return false;
50256 }
50257 function maybeMappedType(node, symbol) {
50258 var container = ts.findAncestor(node.parent, function (n) {
50259 return ts.isComputedPropertyName(n) || ts.isPropertySignature(n) ? false : ts.isTypeLiteralNode(n) || "quit";
50260 });
50261 if (container && container.members.length === 1) {
50262 var type = getDeclaredTypeOfSymbol(symbol);
50263 return !!(type.flags & 1048576 /* TypeFlags.Union */) && allTypesAssignableToKind(type, 384 /* TypeFlags.StringOrNumberLiteral */, /*strict*/ true);
50264 }
50265 return false;
50266 }
50267 function isES2015OrLaterConstructorName(n) {
50268 switch (n) {
50269 case "Promise":

Calls 2

getDeclaredTypeOfSymbolFunction · 0.85
allTypesAssignableToKindFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…