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

Function getTypeFromMappedTypeNode

test/fixtures/snapshot/typescript.js:62485–62498  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

62483 return links.resolvedType;
62484 }
62485 function getTypeFromMappedTypeNode(node) {
62486 var links = getNodeLinks(node);
62487 if (!links.resolvedType) {
62488 var type = createObjectType(32 /* ObjectFlags.Mapped */, node.symbol);
62489 type.declaration = node;
62490 type.aliasSymbol = getAliasSymbolForTypeNode(node);
62491 type.aliasTypeArguments = getTypeArgumentsForAliasSymbol(type.aliasSymbol);
62492 links.resolvedType = type;
62493 // Eagerly resolve the constraint type which forces an error if the constraint type circularly
62494 // references itself through one or more type aliases.
62495 getConstraintTypeFromMappedType(type);
62496 }
62497 return links.resolvedType;
62498 }
62499 function getActualTypeVariable(type) {
62500 if (type.flags & 33554432 /* TypeFlags.Substitution */) {
62501 return type.baseType;

Callers 3

checkMappedTypeFunction · 0.85

Calls 5

getNodeLinksFunction · 0.85
createObjectTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…