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

Function resolveReference

ark/repo/jsdocGen.ts:468–476  ·  view source on GitHub ↗
(
	part: ParsedJsDocPart,
	pageNames: readonly string[]
)

Source from the content-addressed store, hash-verified

466 * Any other becomes a link if we know where it's documented, or else code.
467 */
468const resolveReference = (
469 part: ParsedJsDocPart,
470 pageNames: readonly string[]
471): ParsedJsDocPart => {
472 if (part.kind !== "reference" || pageNames.includes(part.value)) return part
473 const url = referenceUrls[part.value]
474 if (url) return { kind: "link", url, value: part.value }
475 return { kind: "text", value: `\`${part.value}\`` }
476}
477
478const parseJsDocPart = (part: RawJsDocPart): ParsedJsDocPart[] => {
479 switch (part.getKindName()) {

Callers 1

jsDocGenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected