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

Function typeHasProtectedAccessibleBase

test/fixtures/snapshot/typescript.js:76623–76654  ·  view source on GitHub ↗
(target, type)

Source from the content-addressed store, hash-verified

76621 return signatures.compositeKind === 1048576 /* TypeFlags.Union */ ? ts.some(signatures.compositeSignatures, f) : f(signatures);
76622 }
76623 function typeHasProtectedAccessibleBase(target, type) {
76624 var baseTypes = getBaseTypes(type);
76625 if (!ts.length(baseTypes)) {
76626 return false;
76627 }
76628 var firstBase = baseTypes[0];
76629 if (firstBase.flags & 2097152 /* TypeFlags.Intersection */) {
76630 var types = firstBase.types;
76631 var mixinFlags = findMixins(types);
76632 var i = 0;
76633 for (var _i = 0, _a = firstBase.types; _i < _a.length; _i++) {
76634 var intersectionMember = _a[_i];
76635 // We want to ignore mixin ctors
76636 if (!mixinFlags[i]) {
76637 if (ts.getObjectFlags(intersectionMember) & (1 /* ObjectFlags.Class */ | 2 /* ObjectFlags.Interface */)) {
76638 if (intersectionMember.symbol === target) {
76639 return true;
76640 }
76641 if (typeHasProtectedAccessibleBase(target, intersectionMember)) {
76642 return true;
76643 }
76644 }
76645 }
76646 i++;
76647 }
76648 return false;
76649 }
76650 if (firstBase.symbol === target) {
76651 return true;
76652 }
76653 return typeHasProtectedAccessibleBase(target, firstBase);
76654 }
76655 function isConstructorAccessible(node, signature) {
76656 if (!signature || !signature.declaration) {
76657 return true;

Callers 1

isConstructorAccessibleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…