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

Function getBaseConstraintOfType

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

Source from the content-addressed store, hash-verified

58929 return undefined;
58930 }
58931 function getBaseConstraintOfType(type) {
58932 if (type.flags & (58982400 /* TypeFlags.InstantiableNonPrimitive */ | 3145728 /* TypeFlags.UnionOrIntersection */ | 134217728 /* TypeFlags.TemplateLiteral */ | 268435456 /* TypeFlags.StringMapping */)) {
58933 var constraint = getResolvedBaseConstraint(type);
58934 return constraint !== noConstraintType && constraint !== circularConstraintType ? constraint : undefined;
58935 }
58936 return type.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType : undefined;
58937 }
58938 /**
58939 * This is similar to `getBaseConstraintOfType` except it returns the input type if there's no base constraint, instead of `undefined`
58940 * It also doesn't map indexes to `string`, as where this is used this would be unneeded (and likely undesirable)

Callers 15

isConstructorTypeFunction · 0.85
isValidBaseTypeFunction · 0.85
getConstraintOfTypeFunction · 0.85
getBaseConstraintOrTypeFunction · 0.85
getApparentTypeFunction · 0.85
isTypeDerivedFromFunction · 0.85
reportRelationErrorFunction · 0.85
structuredTypeRelatedToFunction · 0.85
getTypeFactsFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…