MCPcopy Create free account
hub / github.com/arktypeio/arktype / parseJsDocPart

Function parseJsDocPart

ark/repo/jsdocGen.ts:478–489  ·  view source on GitHub ↗
(part: RawJsDocPart)

Source from the content-addressed store, hash-verified

476}
477
478const 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
491const parseJsDocText = (text: string | undefined): ParsedJsDocPart[] => {
492 if (!text) return []

Callers

nothing calls this directly

Calls 3

parseJsDocTextFunction · 0.85
parseJsDocLinkFunction · 0.85
throwInternalErrorFunction · 0.85

Tested by

no test coverage detected