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

Function isGenericTypeWithUnionConstraint

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

Source from the content-addressed store, hash-verified

71495 !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent.argumentExpression)));
71496 }
71497 function isGenericTypeWithUnionConstraint(type) {
71498 return !!(type.flags & 465829888 /* TypeFlags.Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* TypeFlags.Nullable */ | 1048576 /* TypeFlags.Union */));
71499 }
71500 function isGenericTypeWithoutNullableConstraint(type) {
71501 return !!(type.flags & 465829888 /* TypeFlags.Instantiable */ && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304 /* TypeFlags.Nullable */));
71502 }

Callers

nothing calls this directly

Calls 1

getBaseConstraintOrTypeFunction · 0.85

Tested by

no test coverage detected