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

Function getHomomorphicTypeVariable

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

Source from the content-addressed store, hash-verified

63487 }
63488 }
63489 function getHomomorphicTypeVariable(type) {
63490 var constraintType = getConstraintTypeFromMappedType(type);
63491 if (constraintType.flags & 4194304 /* TypeFlags.Index */) {
63492 var typeVariable = getActualTypeVariable(constraintType.type);
63493 if (typeVariable.flags & 262144 /* TypeFlags.TypeParameter */) {
63494 return typeVariable;
63495 }
63496 }
63497 return undefined;
63498 }
63499 function instantiateMappedType(type, mapper, aliasSymbol, aliasTypeArguments) {
63500 // For a homomorphic mapped type { [P in keyof T]: X }, where T is some type variable, the mapping
63501 // operation depends on T as follows:

Callers 4

instantiateMappedTypeFunction · 0.85
inferFromTypesFunction · 0.85

Calls 2

getActualTypeVariableFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…