Griffe TypeDocΒ€
Signatures for entire TypeScript programs using TypeDoc.
Still in prototyping phase!
Feedback is welcome.
InstallationΒ€
This project is available to sponsors only, through my Insiders program. See Insiders explanation and installation instructions.
UsageΒ€
Add these TypeDoc configuration files to your repository:
π ./
βββ π src/
β βββ π package1/
βββ typedoc.base.json
βββ typedoc.json
typedoc.base.json
{
"$schema": "https://typedoc.org/schema.json",
"includeVersion": true
}
typedoc.json
{
"extends": ["./typedoc.base.json"],
"entryPointStrategy": "packages",
"entryPoints": ["./src/*"]
}
Update the entrypoints to match your file layout so that TypeDoc can find your packages. See TypeDoc's configuration documentation.
Then in each of your package, add this TypeDoc configuration file:
π ./
βββ π src/
β βββ π package1/
β βββ typedoc.json
βββ typedoc.base.json
βββ typedoc.json
typedoc.json
{
"extends": ["../../typedoc.base.json"],
"entryPointStrategy": "expand",
"entryPoints": ["src/index.d.ts"]
}
Again, update entrypoints to match your file and package layout. See TypeDoc's configuration documentation.
Your packages must be built for TypeDoc to work.
Finally, load your TypeScript API data with Griffe TypeDoc:
from griffe_typedoc.loader import load
data = load(
"typedoc", # name or path of the typedoc executable
working_directory=".", # point at your monorepo
)
See our API reference.