MCPcopy
hub / github.com/angular/angular / getFirstClassDeclaration

Function getFirstClassDeclaration

packages/language-service/testing/src/util.ts:74–80  ·  view source on GitHub ↗
(declaration: string)

Source from the content-addressed store, hash-verified

72}
73
74function getFirstClassDeclaration(declaration: string) {
75 const matches = declaration.match(/(?:export class )(\w+)(?:\s|\{|<)/);
76 if (matches === null || matches.length !== 2) {
77 throw new Error(`Did not find exactly one exported class in: ${declaration}`);
78 }
79 return matches[1].trim();
80}
81
82export function createModuleAndProjectWithDeclarations(
83 env: LanguageServiceTestEnv,

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…