Skip to content

Commit 2aa10c1

Browse files
committed
fix
1 parent c3fe44d commit 2aa10c1

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

apps/svelte.dev/scripts/sync-docs/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ const packages: Package[] = [
3333
m.types!.find((t) => t?.name === 'ActionReturn')
3434
);
3535
const new_children =
36-
module_with_ActionReturn?.types![1].children!.filter((c) => c.name !== '$$_attributes') ||
37-
[];
36+
module_with_ActionReturn?.types![1].overloads[0].children!.filter(
37+
(c) => c.name !== '$$_attributes'
38+
) || [];
3839

3940
if (module_with_ActionReturn) {
40-
module_with_ActionReturn.types![1].children = new_children;
41+
module_with_ActionReturn.types![1].overloads[0].children = new_children;
4142
}
4243

4344
return modules;

packages/site-kit/src/lib/markdown/renderer.ts

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -749,29 +749,33 @@ function stringify_type(t: Declaration) {
749749
return content;
750750
}
751751

752-
function stringify_expanded_type(type: TypeElement) {
752+
function stringify_expanded_type(type: Declaration) {
753753
return (
754754
type.comment +
755-
type.children
756-
?.map((child) => {
757-
let section = `## ${child.name}`;
758-
759-
if (child.bullets) {
760-
section += `\n\n<div class="ts-block-property-bullets">\n\n${child.bullets.join(
761-
'\n'
762-
)}\n\n</div>`;
763-
}
755+
type.overloads
756+
.map((overload) =>
757+
overload.children
758+
?.map((child) => {
759+
let section = `## ${child.name}`;
760+
761+
if (child.bullets) {
762+
section += `\n\n<div class="ts-block-property-bullets">\n\n${child.bullets.join(
763+
'\n'
764+
)}\n\n</div>`;
765+
}
764766

765-
section += `\n\n${child.comment}`;
767+
section += `\n\n${child.comment}`;
766768

767-
if (child.children) {
768-
section += `\n\n<div class="ts-block-property-children">\n\n${child.children
769-
.map((v) => stringify(v))
770-
.join('\n')}\n\n</div>`;
771-
}
769+
if (child.children) {
770+
section += `\n\n<div class="ts-block-property-children">\n\n${child.children
771+
.map((v) => stringify(v))
772+
.join('\n')}\n\n</div>`;
773+
}
772774

773-
return section;
774-
})
775+
return section;
776+
})
777+
.join('\n\n')
778+
)
775779
.join('\n\n')
776780
);
777781
}

0 commit comments

Comments
 (0)