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

Function isGenericTypeWithUndefinedConstraint

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

Source from the content-addressed store, hash-verified

55778 return result;
55779 }
55780 function isGenericTypeWithUndefinedConstraint(type) {
55781 return !!(type.flags & 465829888 /* TypeFlags.Instantiable */) && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 32768 /* TypeFlags.Undefined */);
55782 }
55783 function getNonUndefinedType(type) {
55784 var typeOrConstraint = someType(type, isGenericTypeWithUndefinedConstraint) ? mapType(type, function (t) { return t.flags & 465829888 /* TypeFlags.Instantiable */ ? getBaseConstraintOrType(t) : t; }) : type;
55785 return getTypeWithFacts(typeOrConstraint, 524288 /* TypeFacts.NEUndefined */);

Callers

nothing calls this directly

Calls 2

maybeTypeOfKindFunction · 0.85
getBaseConstraintOfTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…