(host: Tree, sourceRoot: string, mainPath: string)
| 38 | } |
| 39 | |
| 40 | function getServerModulePath(host: Tree, sourceRoot: string, mainPath: string): string | null { |
| 41 | const mainSource = getSourceFile(host, join(sourceRoot, mainPath)); |
| 42 | const allNodes = getSourceNodes(mainSource); |
| 43 | const expNode = allNodes.find((node) => ts.isExportDeclaration(node)); |
| 44 | if (!expNode) { |
| 45 | return null; |
| 46 | } |
| 47 | const relativePath = expNode.moduleSpecifier as ts.StringLiteral; |
| 48 | const modulePath = join(sourceRoot, `${relativePath.text}.ts`); |
| 49 | |
| 50 | return modulePath; |
| 51 | } |
| 52 | |
| 53 | interface TemplateInfo { |
| 54 | templateProp?: ts.PropertyAssignment; |
no test coverage detected