MCPcopy
hub / github.com/arktypeio/arktype / parseJsDocPart

Function parseJsDocPart

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

Source from the content-addressed store, hash-verified

225}
226
227const parseJsDocPart = (part: RawJsDocPart): ParsedJsDocPart[] => {
228 switch (part.getKindName()) {
229 case "JSDocText":
230 return parseJsDocText(part.compilerNode.text)
231 case "JSDocLink":
232 return [parseJsDocLink(part)]
233 default:
234 return throwInternalError(
235 `Unsupported JSDoc part kind ${part.getKindName()} at position ${part.getPos()} in ${part.getSourceFile().getFilePath()}`
236 )
237 }
238}
239
240const parseJsDocText = (text: string | undefined): ParsedJsDocPart[] => {
241 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…