(rootDir)
| 26 | } |
| 27 | |
| 28 | async function findDeclarationFiles(rootDir) { |
| 29 | const entries = await readdir(rootDir, { withFileTypes: true }) |
| 30 | const files = [] |
| 31 | |
| 32 | for (const entry of entries) { |
| 33 | const entryPath = resolve(rootDir, entry.name) |
| 34 | |
| 35 | if (entry.isDirectory()) { |
| 36 | files.push(...(await findDeclarationFiles(entryPath))) |
| 37 | continue |
| 38 | } |
| 39 | |
| 40 | if (entry.isFile() && entry.name.endsWith('.d.ts')) { |
| 41 | files.push(entryPath) |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | return files |
| 46 | } |
| 47 | |
| 48 | function rewriteDeclaration(source) { |
| 49 | return source |
no test coverage detected