(width: number)
| 285 | } |
| 286 | |
| 287 | render(width: number): string[] { |
| 288 | // Extremely narrow terminals can report tiny or even non-positive |
| 289 | // column counts; never propagate a width below 1 into components. |
| 290 | width = Math.max(1, width); |
| 291 | const lines: string[] = []; |
| 292 | for (const child of this.children) { |
| 293 | const childLines = child.render(width); |
| 294 | for (const line of childLines) { |
| 295 | lines.push(line); |
| 296 | } |
| 297 | } |
| 298 | return lines; |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | /** |