(part: RawJsDocPart)
| 476 | } |
| 477 | |
| 478 | const parseJsDocPart = (part: RawJsDocPart): ParsedJsDocPart[] => { |
| 479 | switch (part.getKindName()) { |
| 480 | case "JSDocText": |
| 481 | return parseJsDocText(part.compilerNode.text) |
| 482 | case "JSDocLink": |
| 483 | return [parseJsDocLink(part)] |
| 484 | default: |
| 485 | return throwInternalError( |
| 486 | `Unsupported JSDoc part kind ${part.getKindName()} at position ${part.getPos()} in ${part.getSourceFile().getFilePath()}` |
| 487 | ) |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | const parseJsDocText = (text: string | undefined): ParsedJsDocPart[] => { |
| 492 | if (!text) return [] |
nothing calls this directly
no test coverage detected