MCPcopy Create free account
hub / github.com/TanStack/query / readPropertiesTable

Function readPropertiesTable

scripts/generate-docs.ts:691–706  ·  view source on GitHub ↗
(outputDir: string, from: string)

Source from the content-addressed store, hash-verified

689}
690
691async function readPropertiesTable(outputDir: string, from: string) {
692 const source = await readPage(outputDir, from)
693 const start = source?.indexOf('\n## Properties\n') ?? -1
694 if (source === undefined || start === -1) {
695 return undefined
696 }
697 const fromDir = dirname(from)
698 return source
699 .slice(start + '\n## Properties\n'.length)
700 .trim()
701 .replace(
702 /\]\((?!https?:|#)([^)]+)\)/g,
703 (_, link: string) =>
704 `](../${link.startsWith('../') ? link.slice(3) : `${fromDir}/${link}`})`,
705 )
706}
707
708// Adds to every function page without changing what TypeDoc generated: the properties of each
709// argument and of the result, and an `## Overview` of every call signature on overloaded pages. The

Callers 1

findPropertiesTableFunction · 0.85

Calls 1

readPageFunction · 0.85

Tested by

no test coverage detected