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

Function getClass

packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts:874–881  ·  view source on GitHub ↗
(sf: ts.SourceFile, name: string)

Source from the content-addressed store, hash-verified

872}
873
874export function getClass(sf: ts.SourceFile, name: string): ClassDeclaration<ts.ClassDeclaration> {
875 for (const stmt of sf.statements) {
876 if (isNamedClassDeclaration(stmt) && stmt.name.text === name) {
877 return stmt;
878 }
879 }
880 throw new Error(`Class ${name} not found in file: ${sf.fileName}: ${sf.text}`);
881}
882
883function getDirectiveMetaFromDeclaration(
884 decl: TestDirective,

Calls 1

isNamedClassDeclarationFunction · 0.90

Tested by 1

diagnoseTestComponentFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…