(text, indentLevel = 0)
| 490 | } |
| 491 | |
| 492 | function formatJSDocComment(text, indentLevel = 0) { |
| 493 | if (!text) return ''; |
| 494 | const indent = ' '.repeat(indentLevel); |
| 495 | |
| 496 | const lines = text |
| 497 | .split('\n') |
| 498 | .map(line => line.trim()) |
| 499 | .reduce((acc, line) => { |
| 500 | if (acc.length === 0 && line === '') return acc; |
| 501 | if (acc.length > 0 && line === '' && acc[acc.length - 1] === '') return acc; |
| 502 | acc.push(line); |
| 503 | return acc; |
| 504 | }, []) |
| 505 | .filter((line, i, arr) => i < arr.length - 1 || line !== ''); |
| 506 | |
| 507 | return lines |
| 508 | .map(line => `${indent} * ${line}`) |
| 509 | .join('\n'); |
| 510 | } |
| 511 | |
| 512 | function generateObjectInterface(param, allParams, options = {}) { |
| 513 | // Check if this is an object parameter (either required or optional) |
no test coverage detected