(dir: string, out: string[] = [])
| 57 | } |
| 58 | |
| 59 | const collectTsFiles = (dir: string, out: string[] = []): string[] => { |
| 60 | for (const entry of readdirSync(dir)) { |
| 61 | if (IGNORE_DIRS.has(entry)) continue; |
| 62 | const full = join(dir, entry); |
| 63 | const stat = statSync(full); |
| 64 | if (stat.isDirectory()) { |
| 65 | collectTsFiles(full, out); |
| 66 | continue; |
| 67 | } |
| 68 | if (!stat.isFile()) continue; |
| 69 | if (!entry.endsWith(".ts") && !entry.endsWith(".tsx")) continue; |
| 70 | if (entry.endsWith(".d.ts")) continue; |
| 71 | if (SKIP_FILES.has(full)) continue; |
| 72 | out.push(full); |
| 73 | } |
| 74 | return out; |
| 75 | }; |
| 76 | |
| 77 | /** Match an extends clause shape: |
| 78 | * Schema.Class<X>("ID")(FIELDS_EXPR) |
no test coverage detected