MCPcopy Create free account
hub / github.com/nodejs/node / maybeCloneTypeParameter

Function maybeCloneTypeParameter

test/fixtures/snapshot/typescript.js:62509–62512  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

62507 return type;
62508 }
62509 function maybeCloneTypeParameter(p) {
62510 var constraint = getConstraintOfTypeParameter(p);
62511 return constraint && (isGenericObjectType(constraint) || isGenericIndexType(constraint)) ? cloneTypeParameter(p) : p;
62512 }
62513 function isTypicalNondistributiveConditional(root) {
62514 return !root.isDistributive && isSingletonTupleType(root.node.checkType) && isSingletonTupleType(root.node.extendsType);
62515 }

Callers

nothing calls this directly

Calls 4

isGenericObjectTypeFunction · 0.85
isGenericIndexTypeFunction · 0.85
cloneTypeParameterFunction · 0.85

Tested by

no test coverage detected