Skip to content

Commit

Permalink
fix: Fixed external resolution reference (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Jan 18, 2022
1 parent 98b3653 commit ba935c9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 38 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -38,7 +38,7 @@
"prettier": "^2.5.1",
"tmp": "^0.2.1",
"ts-jest": "^26.5.5",
"typedoc": "^0.22.10",
"typedoc": "^0.22.11",
"typedoc-plugin-mdn-links": "^1.0.4",
"typescript": "^4.4.0"
}
Expand Down
@@ -1,13 +1,12 @@
import * as Handlebars from 'handlebars';
import type * as ts from 'typescript';

import { ReferenceType } from 'typedoc';
import { MarkdownTheme } from '../../theme';

export default function (theme: MarkdownTheme) {
Handlebars.registerHelper(
'attemptExternalResolution',
function (symbol: ts.Symbol | undefined) {
return theme.owner.attemptExternalResolution(symbol);
function (type: ReferenceType) {
return theme.owner.attemptExternalResolution(type);
},
);
}
Expand Up @@ -192,9 +192,7 @@ export function getFunctionType(modelSignatures: SignatureReflection[]) {
}

function getReferenceType(model: ReferenceType, emphasis) {
const externalUrl = Handlebars.helpers.attemptExternalResolution(
model.getSymbol(),
);
const externalUrl = Handlebars.helpers.attemptExternalResolution(model);
if (model.reflection || (model.name && model.typeArguments)) {
const reflection: string[] = [];

Expand Down
51 changes: 21 additions & 30 deletions yarn.lock
Expand Up @@ -5247,13 +5247,6 @@ loud-rejection@^1.0.0:
currently-unhandled "^0.4.1"
signal-exit "^3.0.0"

lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
dependencies:
yallist "^3.0.2"

lru-cache@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
Expand Down Expand Up @@ -5419,10 +5412,10 @@ markdownlint@~0.24.0:
dependencies:
markdown-it "12.2.0"

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

mdurl@^1.0.1:
version "1.0.1"
Expand Down Expand Up @@ -6064,13 +6057,6 @@ onetime@^5.1.0, onetime@^5.1.2:
dependencies:
mimic-fn "^2.1.0"

onigasm@^2.2.5:
version "2.2.5"
resolved "https://registry.yarnpkg.com/onigasm/-/onigasm-2.2.5.tgz#cc4d2a79a0fa0b64caec1f4c7ea367585a676892"
integrity sha512-F+th54mPc0l1lp1ZcFMyL/jTs2Tlq4SqIHKIXGZOR/VkHkF9A7Fr5rRr5+ZG/lWeRsyrClLYRq7s/yFQ/XhWCA==
dependencies:
lru-cache "^5.1.1"

optionator@^0.8.1:
version "0.8.3"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
Expand Down Expand Up @@ -7054,13 +7040,13 @@ shellwords@^0.1.1:
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==

shiki@^0.9.12:
version "0.9.12"
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.9.12.tgz#70cbc8c1bb78ff7b356f84a7eecdb040efddd247"
integrity sha512-VXcROdldv0/Qu0w2XvzU4IrvTeBNs/Kj/FCmtcEXGz7Tic/veQzliJj6tEiAgoKianhQstpYmbPDStHU5Opqcw==
shiki@^0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.10.0.tgz#85f21ecfa95b377ff64db6c71442c22c220e9540"
integrity sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA==
dependencies:
jsonc-parser "^3.0.0"
onigasm "^2.2.5"
vscode-oniguruma "^1.6.1"
vscode-textmate "5.2.0"

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

typedoc@^0.22.10:
version "0.22.10"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.22.10.tgz#221e1a2b17bcb71817ef027dc4c4969d572e7620"
integrity sha512-hQYZ4WtoMZ61wDC6w10kxA42+jclWngdmztNZsDvIz7BMJg7F2xnT+uYsUa7OluyKossdFj9E9Ye4QOZKTy8SA==
typedoc@^0.22.11:
version "0.22.11"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.22.11.tgz#a3d7f4577eef9fc82dd2e8f4e2915e69f884c250"
integrity sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA==
dependencies:
glob "^7.2.0"
lunr "^2.3.9"
marked "^3.0.8"
marked "^4.0.10"
minimatch "^3.0.4"
shiki "^0.9.12"
shiki "^0.10.0"

typescript@^4.4.0:
version "4.5.4"
Expand Down Expand Up @@ -7996,6 +7982,11 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"

vscode-oniguruma@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz#2bf4dfcfe3dd2e56eb549a3068c8ee39e6c30ce5"
integrity sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ==

vscode-textmate@5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e"
Expand Down Expand Up @@ -8270,7 +8261,7 @@ y18n@^5.0.5:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==

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

0 comments on commit ba935c9

Please sign in to comment.