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

Function getNormalizedType

test/fixtures/snapshot/typescript.js:64643–64657  ·  view source on GitHub ↗
(type, writing)

Source from the content-addressed store, hash-verified

64641 return ts.getObjectFlags(source) & 2048 /* ObjectFlags.JsxAttributes */ && isHyphenatedJsxName(sourceProp.escapedName);
64642 }
64643 function getNormalizedType(type, writing) {
64644 while (true) {
64645 var t = isFreshLiteralType(type) ? type.regularType :
64646 ts.getObjectFlags(type) & 4 /* ObjectFlags.Reference */ && type.node ? createTypeReference(type.target, getTypeArguments(type)) :
64647 type.flags & 3145728 /* TypeFlags.UnionOrIntersection */ ? getReducedType(type) :
64648 type.flags & 33554432 /* TypeFlags.Substitution */ ? writing ? type.baseType : type.substitute :
64649 type.flags & 25165824 /* TypeFlags.Simplifiable */ ? getSimplifiedType(type, writing) :
64650 type;
64651 t = getSingleBaseForNonAugmentingSubtype(t) || t;
64652 if (t === type)
64653 break;
64654 type = t;
64655 }
64656 return type;
64657 }
64658 /**
64659 * Checks if 'source' is related to 'target' (e.g.: is a assignable to).
64660 * @param source The left-hand-side of the relation.

Callers 1

isRelatedToFunction · 0.85

Calls 6

isFreshLiteralTypeFunction · 0.85
createTypeReferenceFunction · 0.85
getTypeArgumentsFunction · 0.85
getReducedTypeFunction · 0.85
getSimplifiedTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…