Files
archived-next-auth/docs/tyepdoc.js
Balázs Orbán e699ff14b8 docs: /reference sidebar improvements (#6115)
* wip

* 🤖 lazy commit

* 🤖 lazy commit

* revert some changes, remove prettier jsdoc plugin for now

* sidebar tweaks

* add adapter module docs

* remove provider docs

* embed all reflections under modules

Based on: https://github.com/TypeStrong/typedoc/issues/2006

Related: https://github.com/tgreyuk/typedoc-plugin-markdown/issues/338

* no trailing slash, update theme

* updates

* update snapshot

* update sidebar and overview
2022-12-19 01:00:06 +00:00

22 lines
572 B
JavaScript

// @ts-check
const standards = new Set([
"Headers",
"Request",
"Response",
"URL",
"URLSearchParams",
])
/** @param {import("typedoc").Application} app */
module.exports.load = (app) => {
// When a standard API is referenced, link to the MDN page for it.
app.converter.addUnknownSymbolResolver((reference) => {
const name = reference.symbolReference?.path?.[0].path ?? ""
if (reference.moduleSource !== "typescript" || !standards.has(name)) {
return undefined
}
return `https://developer.mozilla.org/en-US/docs/Web/API/${name}`
})
}