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

Function collectMemberMethods

packages/language-service/src/utils/ts_utils.ts:177–189  ·  view source on GitHub ↗
(
  clazz: ts.ClassDeclaration,
  typeChecker: ts.TypeChecker,
)

Source from the content-addressed store, hash-verified

175 * Collects all member methods, including those from base classes.
176 */
177export function collectMemberMethods(
178 clazz: ts.ClassDeclaration,
179 typeChecker: ts.TypeChecker,
180): ts.MethodDeclaration[] {
181 const members: ts.MethodDeclaration[] = [];
182 const apparentProps = typeChecker.getTypeAtLocation(clazz).getApparentProperties();
183 for (const prop of apparentProps) {
184 if (prop.valueDeclaration && ts.isMethodDeclaration(prop.valueDeclaration)) {
185 members.push(prop.valueDeclaration);
186 }
187 }
188 return members;
189}
190
191/**
192 * Given an existing array literal expression, update it by pushing a new expression.

Callers 2

getMemberMethodNamesFunction · 0.90

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…