(method: ts.MethodSignature)
| 37 | } |
| 38 | |
| 39 | const getMethodSignature = (method: ts.MethodSignature): string => { |
| 40 | const methodName = method.name?.getText(sourceFile) ?? "Unnamed" |
| 41 | const parameters = method.parameters |
| 42 | .map(param => { |
| 43 | const paramName = param.name.getText(sourceFile) |
| 44 | const paramType = param.type ? param.type.getFullText(sourceFile).trim() : "any" |
| 45 | return `${paramName}: ${paramType}` |
| 46 | }) |
| 47 | .join(", ") |
| 48 | |
| 49 | const returnType = method.type ? method.type.getFullText(sourceFile).trim() : "void" |
| 50 | return `${methodName}(${parameters}): ${returnType}` |
| 51 | } |
| 52 | |
| 53 | const getMemberSignature = (member: ts.TypeElement): string => { |
| 54 | if (ts.isMethodSignature(member)) { |
no outgoing calls
no test coverage detected