( clazz: ts.ClassDeclaration, typeChecker: ts.TypeChecker, )
| 175 | * Collects all member methods, including those from base classes. |
| 176 | */ |
| 177 | export 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. |
no test coverage detected
searching dependent graphs…