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

Function checkBaseTypeAccessibility

test/fixtures/snapshot/typescript.js:84333–84344  ·  view source on GitHub ↗
(type, node)

Source from the content-addressed store, hash-verified

84331 }
84332 }
84333 function checkBaseTypeAccessibility(type, node) {
84334 var signatures = getSignaturesOfType(type, 1 /* SignatureKind.Construct */);
84335 if (signatures.length) {
84336 var declaration = signatures[0].declaration;
84337 if (declaration && ts.hasEffectiveModifier(declaration, 8 /* ModifierFlags.Private */)) {
84338 var typeClassDeclaration = ts.getClassLikeDeclarationOfSymbol(type.symbol);
84339 if (!isNodeWithinClass(node, typeClassDeclaration)) {
84340 error(node, ts.Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol));
84341 }
84342 }
84343 }
84344 }
84345 /**
84346 * Checks a member declaration node to see if has a missing or invalid `override` modifier.
84347 * @param node Class-like node where the member is declared.

Callers 1

Calls 4

getSignaturesOfTypeFunction · 0.85
isNodeWithinClassFunction · 0.85
getFullyQualifiedNameFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected