MCPcopy Index your code
hub / github.com/angular/angular / findContainingClass

Function findContainingClass

packages/compiler-cli/test/ngtsc/scope_spec.ts:699–708  ·  view source on GitHub ↗
(node: ts.Node)

Source from the content-addressed store, hash-verified

697});
698
699function findContainingClass(node: ts.Node): ts.ClassDeclaration {
700 while (!ts.isClassDeclaration(node)) {
701 if (node.parent && node.parent !== node) {
702 node = node.parent;
703 } else {
704 throw new Error('Expected node to have a ClassDeclaration parent');
705 }
706 }
707 return node;
708}

Callers 1

scope_spec.tsFile · 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…