Skip to content

Commit ba935c9

Browse files
committed
fix: Fixed external resolution reference (#283)
1 parent 98b3653 commit ba935c9

4 files changed

Lines changed: 26 additions & 38 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"prettier": "^2.5.1",
3939
"tmp": "^0.2.1",
4040
"ts-jest": "^26.5.5",
41-
"typedoc": "^0.22.10",
41+
"typedoc": "^0.22.11",
4242
"typedoc-plugin-mdn-links": "^1.0.4",
4343
"typescript": "^4.4.0"
4444
}
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import * as Handlebars from 'handlebars';
2-
import type * as ts from 'typescript';
3-
2+
import { ReferenceType } from 'typedoc';
43
import { MarkdownTheme } from '../../theme';
54

65
export default function (theme: MarkdownTheme) {
76
Handlebars.registerHelper(
87
'attemptExternalResolution',
9-
function (symbol: ts.Symbol | undefined) {
10-
return theme.owner.attemptExternalResolution(symbol);
8+
function (type: ReferenceType) {
9+
return theme.owner.attemptExternalResolution(type);
1110
},
1211
);
1312
}

packages/typedoc-plugin-markdown/src/resources/helpers/type.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,7 @@ export function getFunctionType(modelSignatures: SignatureReflection[]) {
192192
}
193193

194194
function getReferenceType(model: ReferenceType, emphasis) {
195-
const externalUrl = Handlebars.helpers.attemptExternalResolution(
196-
model.getSymbol(),
197-
);
195+
const externalUrl = Handlebars.helpers.attemptExternalResolution(model);
198196
if (model.reflection || (model.name && model.typeArguments)) {
199197
const reflection: string[] = [];
200198

yarn.lock

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5247,13 +5247,6 @@ loud-rejection@^1.0.0:
52475247
currently-unhandled "^0.4.1"
52485248
signal-exit "^3.0.0"
52495249

5250-
lru-cache@^5.1.1:
5251-
version "5.1.1"
5252-
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
5253-
integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
5254-
dependencies:
5255-
yallist "^3.0.2"
5256-
52575250
lru-cache@^6.0.0:
52585251
version "6.0.0"
52595252
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
@@ -5419,10 +5412,10 @@ markdownlint@~0.24.0:
54195412
dependencies:
54205413
markdown-it "12.2.0"
54215414

5422-
marked@^3.0.8:
5423-
version "3.0.8"
5424-
resolved "https://registry.yarnpkg.com/marked/-/marked-3.0.8.tgz#2785f0dc79cbdc6034be4bb4f0f0a396bd3f8aeb"
5425-
integrity sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==
5415+
marked@^4.0.10:
5416+
version "4.0.10"
5417+
resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.10.tgz#423e295385cc0c3a70fa495e0df68b007b879423"
5418+
integrity sha512-+QvuFj0nGgO970fySghXGmuw+Fd0gD2x3+MqCWLIPf5oxdv1Ka6b2q+z9RP01P/IaKPMEramy+7cNy/Lw8c3hw==
54265419

54275420
mdurl@^1.0.1:
54285421
version "1.0.1"
@@ -6064,13 +6057,6 @@ onetime@^5.1.0, onetime@^5.1.2:
60646057
dependencies:
60656058
mimic-fn "^2.1.0"
60666059

6067-
onigasm@^2.2.5:
6068-
version "2.2.5"
6069-
resolved "https://registry.yarnpkg.com/onigasm/-/onigasm-2.2.5.tgz#cc4d2a79a0fa0b64caec1f4c7ea367585a676892"
6070-
integrity sha512-F+th54mPc0l1lp1ZcFMyL/jTs2Tlq4SqIHKIXGZOR/VkHkF9A7Fr5rRr5+ZG/lWeRsyrClLYRq7s/yFQ/XhWCA==
6071-
dependencies:
6072-
lru-cache "^5.1.1"
6073-
60746060
optionator@^0.8.1:
60756061
version "0.8.3"
60766062
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
@@ -7054,13 +7040,13 @@ shellwords@^0.1.1:
70547040
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
70557041
integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==
70567042

7057-
shiki@^0.9.12:
7058-
version "0.9.12"
7059-
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.9.12.tgz#70cbc8c1bb78ff7b356f84a7eecdb040efddd247"
7060-
integrity sha512-VXcROdldv0/Qu0w2XvzU4IrvTeBNs/Kj/FCmtcEXGz7Tic/veQzliJj6tEiAgoKianhQstpYmbPDStHU5Opqcw==
7043+
shiki@^0.10.0:
7044+
version "0.10.0"
7045+
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.10.0.tgz#85f21ecfa95b377ff64db6c71442c22c220e9540"
7046+
integrity sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA==
70617047
dependencies:
70627048
jsonc-parser "^3.0.0"
7063-
onigasm "^2.2.5"
7049+
vscode-oniguruma "^1.6.1"
70647050
vscode-textmate "5.2.0"
70657051

70667052
side-channel@^1.0.4:
@@ -7816,16 +7802,16 @@ typedoc-plugin-mdn-links@^1.0.4:
78167802
resolved "https://registry.yarnpkg.com/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-1.0.4.tgz#be1f1797a46af33d2428833ea6c2dc26572031b7"
78177803
integrity sha512-mw5IISaKRq8w1hJwp05vkFD9Ijtlv9j7uuM68zlp1zVdzQr4JRYQBTtde4cnSdYatFmLVjQpuFYwoGREJxlHlw==
78187804

7819-
typedoc@^0.22.10:
7820-
version "0.22.10"
7821-
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.22.10.tgz#221e1a2b17bcb71817ef027dc4c4969d572e7620"
7822-
integrity sha512-hQYZ4WtoMZ61wDC6w10kxA42+jclWngdmztNZsDvIz7BMJg7F2xnT+uYsUa7OluyKossdFj9E9Ye4QOZKTy8SA==
7805+
typedoc@^0.22.11:
7806+
version "0.22.11"
7807+
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.22.11.tgz#a3d7f4577eef9fc82dd2e8f4e2915e69f884c250"
7808+
integrity sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA==
78237809
dependencies:
78247810
glob "^7.2.0"
78257811
lunr "^2.3.9"
7826-
marked "^3.0.8"
7812+
marked "^4.0.10"
78277813
minimatch "^3.0.4"
7828-
shiki "^0.9.12"
7814+
shiki "^0.10.0"
78297815

78307816
typescript@^4.4.0:
78317817
version "4.5.4"
@@ -7996,6 +7982,11 @@ [email protected]:
79967982
core-util-is "1.0.2"
79977983
extsprintf "^1.2.0"
79987984

7985+
vscode-oniguruma@^1.6.1:
7986+
version "1.6.1"
7987+
resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz#2bf4dfcfe3dd2e56eb549a3068c8ee39e6c30ce5"
7988+
integrity sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ==
7989+
79997990
80007991
version "5.2.0"
80017992
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e"
@@ -8270,7 +8261,7 @@ y18n@^5.0.5:
82708261
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
82718262
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
82728263

8273-
yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3:
8264+
yallist@^3.0.0, yallist@^3.0.3:
82748265
version "3.1.1"
82758266
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
82768267
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==

0 commit comments

Comments
 (0)