File tree Expand file tree Collapse file tree 2 files changed +26
-21
lines changed
apps/svelte.dev/scripts/sync-docs
packages/site-kit/src/lib/markdown Expand file tree Collapse file tree 2 files changed +26
-21
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,12 @@ const packages: Package[] = [
33
33
m . types ! . find ( ( t ) => t ?. name === 'ActionReturn' )
34
34
) ;
35
35
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
+ ) || [ ] ;
38
39
39
40
if ( module_with_ActionReturn ) {
40
- module_with_ActionReturn . types ! [ 1 ] . children = new_children ;
41
+ module_with_ActionReturn . types ! [ 1 ] . overloads [ 0 ] . children = new_children ;
41
42
}
42
43
43
44
return modules ;
Original file line number Diff line number Diff line change @@ -749,29 +749,33 @@ function stringify_type(t: Declaration) {
749
749
return content ;
750
750
}
751
751
752
- function stringify_expanded_type ( type : TypeElement ) {
752
+ function stringify_expanded_type ( type : Declaration ) {
753
753
return (
754
754
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
+ }
764
766
765
- section += `\n\n${ child . comment } ` ;
767
+ section += `\n\n${ child . comment } ` ;
766
768
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
+ }
772
774
773
- return section ;
774
- } )
775
+ return section ;
776
+ } )
777
+ . join ( '\n\n' )
778
+ )
775
779
. join ( '\n\n' )
776
780
) ;
777
781
}
You can’t perform that action at this time.
0 commit comments