Add TypeDoc documentation website with GitHub Pages deployment#1281
Draft
Add TypeDoc documentation website with GitHub Pages deployment#1281
Conversation
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add documentation website for type-fest repository
Add TypeDoc documentation website with GitHub Pages deployment
Oct 20, 2025
Collaborator
|
Demo deployment: https://demo-type-fest-docs-only-qul87138q-fregante-team.vercel.app/types/UndefinedOnPartialDeep.html @sindresorhus @som-sm it's not the prettiest site, but it has a couple of advantages:
Drawbacks of removing the index from the readme:
Probably the latter can be configured in type-doc. Other sections like "Declined types" and "Built-in types" would remain in the readme. |
Owner
|
I'm not sure about this. I don't have very good experience with TypeDoc. Last time I used it, it was buggy, took long time to support new TS version (so peerDependency issues), no categorization, and the shown types were often wrong. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.