Skip to content

Commit e0f97c8

Browse files
committed
Merge branch 'master' into version-2
2 parents ad2db74 + b80a982 commit e0f97c8

File tree

1 file changed

+8
-1
lines changed
  • sites/kit.svelte.dev/scripts/types

1 file changed

+8
-1
lines changed

sites/kit.svelte.dev/scripts/types/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@ async function get_types(code, statements) {
6565
// @ts-ignore
6666
const jsDoc = statement.jsDoc[0];
6767

68-
comment = jsDoc.comment;
68+
// `@link` JSDoc tags (and maybe others?) turn this property into an array, which we need to join manually
69+
if (Array.isArray(jsDoc.comment)) {
70+
comment = jsDoc.comment
71+
.map(({ name, text }) => (name ? `\`${name.escapedText}\`` : text))
72+
.join('');
73+
} else {
74+
comment = jsDoc.comment;
75+
}
6976

7077
if (jsDoc?.tags?.[0]?.tagName?.escapedText === 'deprecated') {
7178
deprecated_notice = jsDoc.tags[0].comment;

0 commit comments

Comments
 (0)