Add TypeDoc documentation website with GitHub Pages deployment #1281
+119
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a comprehensive TypeDoc-powered documentation website for type-fest that will be automatically deployed to GitHub Pages.
Overview
The repository now has a professional API documentation site that showcases all 250+ exported types with their definitions, examples, and direct links to source code. The documentation is automatically generated and deployed whenever changes are pushed to the main branch.
What's New
Documentation Generation
.d.tsfile on GitHub with line numbersAutomated Deployment
mainactions/deploy-pagesactionDeveloper Experience
npm run docs- generate documentation locally for testingDocumentation Preview
Homepage:

The documentation homepage presents the README content with the type-fest branding and provides categorized navigation to all types.
Type Page Example (Merge):

Each type page shows the complete type definition, parameters, examples, and a "Defined in" link that takes you directly to the source code on GitHub.
Files Modified
.github/workflows/docs.yml- New workflow for automated documentation deploymenttypedoc.json- TypeDoc configuration with GitHub integrationpackage.json- Added TypeDoc dependency anddocsscripttsconfig.json- Excludeddocs/directory from compilation.gitignore- Addeddocs/to ignore generated filesreadme.md- Added documentation section with link to the siteActivation
To enable the documentation website, a repository admin needs to:
Once enabled, documentation will be available at https://sindresorhus.github.io/type-fest/
The workflow will automatically run on the next push to
mainand deploy the site.Testing
✅ All existing tests pass
✅ Documentation generates successfully (250+ types documented)
✅ CodeQL security scan passed (no vulnerabilities)
✅ Local preview tested and verified
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.