(sourceFile: ts.SourceFile)
| 93 | } |
| 94 | |
| 95 | function extractStateProps(sourceFile: ts.SourceFile): string[] { |
| 96 | const props: string[] = []; |
| 97 | |
| 98 | for (const statement of sourceFile.statements) { |
| 99 | if (!ts.isInterfaceDeclaration(statement)) continue; |
| 100 | const name = statement.name.text; |
| 101 | if (!name.endsWith('State') && !name.includes('State')) continue; |
| 102 | if (name.endsWith('ViewModel') || name.endsWith('VM')) continue; |
| 103 | |
| 104 | for (const member of statement.members) { |
| 105 | if (ts.isPropertySignature(member) && member.name && ts.isIdentifier(member.name)) { |
| 106 | props.push(member.name.text); |
| 107 | } |
| 108 | } |
| 109 | if (props.length > 0) break; |
| 110 | } |
| 111 | |
| 112 | return props; |
| 113 | } |
| 114 | |
| 115 | function extractRenderElements(sourceFile: ts.SourceFile): string[] { |
| 116 | const elements: string[] = []; |
no test coverage detected