Skip to content

Commit

Permalink
Merge pull request #8 from ocavue/ocavue/api-0-24
Browse files Browse the repository at this point in the history
Use new resolve API to support TypeDoc v0.24
  • Loading branch information
Gerrit0 authored Mar 10, 2023
2 parents 26c6ef9 + 1b49f0e commit b858253
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 61 deletions.
133 changes: 75 additions & 58 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"devDependencies": {
"prettier": "^2.7.1",
"typedoc": "^0.23.1",
"typedoc": "^0.23.26",
"typescript": "^4.7.4"
},
"keywords": [
Expand All @@ -15,7 +15,7 @@
"dist"
],
"peerDependencies": {
"typedoc": "0.22.x || 0.23.x"
"typedoc": ">= 0.23.14 || 0.24.x"
},
"scripts": {
"lint": "prettier --check .",
Expand Down
9 changes: 8 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ import { resolveWebAudioName } from "./webaudio";
export function load(app: Application) {
const failed = new Set<string>();

app.renderer.addUnknownSymbolResolver("typescript", (name) => {
app.converter.addUnknownSymbolResolver((declaration) => {
if (declaration.moduleSource !== "typescript") return;

const name = declaration.symbolReference?.path
?.map((path) => path.path)
.join(".");
if (!name) return;

const result =
resolveGlobalName(name) ??
resolveDomName(name) ??
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"target": "es2020",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"isolatedModules": true,
"outDir": "dist"
},
Expand Down

0 comments on commit b858253

Please sign in to comment.