Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
TypeDoc is a documentation generator for TypeScript projects. It reads your TypeScript source code and its comments and produces an HTML documentation website. It is capable of creating readable and user-friendly documentation for TypeScript projects, which can be very helpful for both maintaining internal code and for sharing code with external users.
Generating Documentation
This command generates documentation for the TypeScript source files located in the 'src' directory and outputs the result to the 'docs' directory.
typedoc --out docs src
Customizing the Theme
This command generates documentation with a minimal theme, which is one of the built-in themes provided by TypeDoc.
typedoc --out docs src --theme minimal
Excluding Private Members
This command generates documentation while excluding private members from the output, making the documentation cleaner if private members are not intended to be part of the public API.
typedoc --out docs src --excludePrivate
Including Declaration Files
This command includes type declaration files (d.ts files) in the documentation generation process, which can be useful for documenting the types that are part of the project's external API.
typedoc --out docs src --includeDeclarations
JSDoc is a popular documentation generator for JavaScript. It uses comments in the source code to generate comprehensive documentation. While similar in purpose to TypeDoc, JSDoc is tailored for JavaScript and requires additional plugins to work well with TypeScript.
ESDoc is another documentation generator for JavaScript, with support for ES6+ syntax. It provides features like coverage reporting and integrated test codes in the documentation. ESDoc is not as TypeScript-focused as TypeDoc and may require additional configuration for TypeScript projects.
Documentation generator for TypeScript projects.
For more detailed documentation, the changelog, and TypeDoc documentation rendered with TypeDoc, see https://typedoc.org.
TypeDoc runs on Node.js and is available as a NPM package.
npm install typedoc --save-dev
To generate documentation TypeDoc needs to know your project entry point and TypeScript
compiler options. It will automatically try to find your tsconfig.json
file, so you can
just specify the entry point of your library:
typedoc src/index.ts
If you have multiple entry points, specify each of them.
typedoc package1/index.ts package2/index.ts
If you specify a directory, TypeDoc will use the entryPointStrategy
option to determine how to resolve it.
By default, TypeDoc will search for a file called index
under the directory.
If your codebase is comprised of one or more npm packages, you can build documentation for each of them individually
and merge the results together into a single site by setting entryPointStrategy
to packages
. In this mode TypeDoc
requires configuration to be present in each directory to specify the entry points. For an example setup, see
https://github.com/Gerrit0/typedoc-packages-example
For a complete list of the command line arguments run typedoc --help
or visit
our website.
--out <path/to/documentation/>
./docs
--json <path/to/output.json>
--out
is also
specified.--options
--tsconfig <path/to/tsconfig.json>
--exclude <pattern>
--theme <default|plugin defined theme>
--name <Documentation title>
--readme <path/to/readme|none>
none
to disable the index page
and start the documentation on the globals page.--version
--help
This project is maintained by a community of developers. Contributions are welcome and appreciated. You can find TypeDoc on GitHub; feel free to open an issue or create a pull request: https://github.com/TypeStrong/typedoc
For more information, read the contribution guide.
v0.24.0 (2023-04-08)
@link
, @linkcode
and @linkplain
tags will now be resolved with TypeScript's link resolution by default. The useTsLinkResolution
option
can be used to turn this behavior off, but be aware that doing so will mean your links will be resolved differently by editor tooling and TypeDoc.node_modules
. Specify the --plugin
option to indicate which modules should be loaded.packages
entry point strategy will now run TypeDoc in each provided package directory and then merge the results together.
The previous packages
strategy has been preserved under legacy-packages
and will be removed in 0.25. If the new strategy does not work
for your use case, please open an issue.--logger
option, to disable all logging, set the logLevel
option to none
.[[link]]
s, removed deprecated Reflection.findReflectionByName
.@overload
to default ignored tags.label
property on Reflection
has moved to Comment
.out
option has been changed from ""
to "./docs"
, #2195.DeclarationReflection#version
to DeclarationReflection#projectVersion
to match property on ProjectReflection
.Reflection#originalName
.Reflection#kindString
, use ReflectionKind.singularString(reflection.kind)
or ReflectionKind.pluralString(reflection.kind)
instead.named-tuple-member
and template-literal
type kind have been replaced with namedTupleMember
and templateLiteral
, #2100.Reflection
, including url
, anchor
, hasOwnDocument
, and cssClasses
.Application.bootstrap
will no longer load plugins. If you want to load plugins, use Application.bootstrapWithPlugins
instead, #1635.Application.bootstrap
will now be applied both before and after reading options files, which may cause a change in configuration
if using a custom script to run TypeDoc that includes some options, but other options are set in config files.sources
property previously declared on base Reflection
class to DeclarationReflection
and SignatureReflection
.relevanceBoost
from ContainerReflection
to DeclarationReflection
since setting it on the parent class has no effect.ReferenceType.getSymbol
, reference types no longer reference the ts.Symbol
to enable generation from serialized JSON.OptionsReader.priority
has been renamed to OptionsReader.order
to more accurately reflect how it works.ReferenceType
s which point to type parameters will now always be intentionally broken since they were never linked and should not be warned about when validating exports.ReferenceType
s now longer include an id
property for their target. They now instead include a target
property.Renderer.addExternalSymbolResolver
, use Converter.addExternalSymbolResolver
instead.CallbackLogger
.SerializeEventData
from serialization events.PageEvent
is now required for getRenderContext
. If caching the context object, page
must be updated when getRenderContext
is called.PageEvent
no longer includes the template
property. The Theme.render
method is now expected to take the template to render the page with as its second argument.secondaryNavigation
member on DefaultThemeRenderContext
.navigation
to sidebar
on DefaultThemeRenderContext
and navigation.begin
/navigation.end
hooks to sidebar.begin
/sidebar.end
.--useTsLinkResolution
option (on by default) which tells TypeDoc to use TypeScript's @link
resolution.--jsDocCompatibility
option (on by default) which controls TypeDoc's automatic detection of code blocks in @example
and @default
tags.@interface
on type aliases to tell TypeDoc to convert the fully resolved type as an interface, #1519@namespace
on variable declarations to tell TypeDoc to convert the variable as a namespace, #2055.@prop
/@property
to specify documentation for a child property of a symbol, intended for use with @interface
.Promise<void>
from their load
function, #185.Renderer.preRenderAsyncJobs
and Renderer.postRenderAsyncJobs
, which may be used by plugins to perform async processing for rendering, #185.
Note: Conversion is still intentionally a synchronous process to ensure stability of converted projects between runs.typedocOptions
key in package.json
, #2112.--cacheBust
option to tell TypeDoc to include include the generation time in files, #2124.--excludeReferences
option to tell TypeDoc to omit re-exports of a symbol already included from the documentation.pageSidebar.begin
and pageSidebar.end
.name
field, #2190.@inheritDoc
on signatures (functions, methods, constructors, getters, setters) being unable to inherit from a non-signature.v
in versions, #2212.typeof
on a reference with type arguments, #2220.FAQs
Create api documentation for TypeScript projects.
The npm package typedoc receives a total of 1,310,905 weekly downloads. As such, typedoc popularity was classified as popular.
We found that typedoc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.