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

Function isConstructorType

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

Source from the content-addressed store, hash-verified

57066 return false;
57067 }
57068 function isConstructorType(type) {
57069 if (getSignaturesOfType(type, 1 /* SignatureKind.Construct */).length > 0) {
57070 return true;
57071 }
57072 if (type.flags & 8650752 /* TypeFlags.TypeVariable */) {
57073 var constraint = getBaseConstraintOfType(type);
57074 return !!constraint && isMixinConstructorType(constraint);
57075 }
57076 return false;
57077 }
57078 function getBaseTypeNodeOfClass(type) {
57079 var decl = ts.getClassLikeDeclarationOfSymbol(type.symbol);
57080 return decl && ts.getEffectiveBaseTypeNode(decl);

Callers 4

narrowTypeByConstructorFunction · 0.85
narrowTypeByInstanceofFunction · 0.85

Calls 3

getSignaturesOfTypeFunction · 0.85
getBaseConstraintOfTypeFunction · 0.85
isMixinConstructorTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…