From 6d52611d8e6c068e9a520ff0d0ce04814ef3d9ba Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Tue, 5 Sep 2023 20:50:11 -0600 Subject: [PATCH] Updates to support TypeDoc 0.25.x --- package.json | 2 +- src/themes/OverrideTheme.tsx | 6 +----- yarn.lock | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index d4368a7..a2cc044 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "webpack-cli": "^4.9.1" }, "peerDependencies": { - "typedoc": ">=0.24.0" + "typedoc": "^0.24.0 || ^0.25.0" }, "scripts": { "build": "webpack && tsc --project tsconfig.build.json", diff --git a/src/themes/OverrideTheme.tsx b/src/themes/OverrideTheme.tsx index 8e52182..5bb99c7 100644 --- a/src/themes/OverrideTheme.tsx +++ b/src/themes/OverrideTheme.tsx @@ -7,8 +7,6 @@ import { Renderer } from 'typedoc/dist/lib/output/renderer'; import { OverrideThemeContext } from './OverrideThemeContext'; export class OverrideTheme extends DefaultTheme { - private _contextCache?: OverrideThemeContext; - public constructor(renderer: Renderer) { super(renderer); @@ -27,12 +25,10 @@ export class OverrideTheme extends DefaultTheme { public override getRenderContext( page: PageEvent, ): OverrideThemeContext { - this._contextCache ||= new OverrideThemeContext( + return new OverrideThemeContext( this, page, this.application.options, ); - - return this._contextCache; } } diff --git a/yarn.lock b/yarn.lock index 0642a75..7c2a7fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5867,7 +5867,7 @@ __metadata: webpack: ^5.65.0 webpack-cli: ^4.9.1 peerDependencies: - typedoc: ">=0.24.0" + typedoc: ^0.24.0 || ^0.25.0 languageName: unknown linkType: soft