Skip to content

Commit

Permalink
Improve documentation of additionalModuleSources option
Browse files Browse the repository at this point in the history
Resolves #20
  • Loading branch information
Gerrit0 committed Sep 6, 2024
1 parent a960dfc commit 8e7f099
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
# typedoc-plugin-mdn-links

Adds support for linking references to global types like `HTMLElement`, `WebAssembly`, and `Date` to their documentation pages on MDN.
Adds support for linking references to global types like `HTMLElement`,
`WebAssembly`, and `Date` to their documentation pages on MDN.

If you're explicitly referencing a type in a comment, you can use `{@link !HTMLElement}` to have it processed by this plugin.
If you're explicitly referencing a type in a comment, you can use `{@link
!HTMLElement}` to have it processed by this plugin.

If you set `--logLevel Verbose`, it will print out when failing to resolve a symbol to a page on MDN. Pull requests to fix failed resolution are welcome!
If you set `--logLevel Verbose`, it will print out when failing to resolve a
symbol to a page on MDN. Pull requests to fix failed resolution are welcome!

Supports TypeDoc 0.23.x, 0.24.x and 0.25.x

| Option | Default | Description |
| ----------------------- | ------- | ------------------------------------------------------------------------------------------ |
| resolveUtilityTypes | `true` | Resolve links to `Partial`, `Omit`, etc. to their documentation on the TypeScript website. |
| additionalModuleSources | `false` | Specify additional node_modules to attempt to resolve links to MDN from. |
## Options

- `resolveUtilityTypes`

Defaults to `true`. If set, will resolve links to `Partial`, `Omit`, etc. to
their documentation on the TypeScript website.

- `additionalModuleSources`

Defaults to `[]`. Specifies additional node_modules packages to attempt to
resolve links to MDN from. By default, resolves types declared in the
`typescript`, `@types/web`, and `@webgpu/types` packages. You should only
need to set this option if using an unusual type package to define globally
available types.

## Changelog

Expand Down

0 comments on commit 8e7f099

Please sign in to comment.