File tree 2 files changed +6
-34
lines changed
misc/structured-types/src
2 files changed +6
-34
lines changed Original file line number Diff line number Diff line change 239
239
"name" : " jest structured-types" ,
240
240
"program" : " ${workspaceFolder}/node_modules/.bin/jest" ,
241
241
"cwd" : " ${workspaceFolder}/misc/structured-types" ,
242
- "args" : [" boolean -prop" ],
242
+ "args" : [" object -prop" ],
243
243
"console" : " integratedTerminal" ,
244
244
"internalConsoleOptions" : " neverOpen" ,
245
245
"disableOptimisticBPs" : true ,
Original file line number Diff line number Diff line change @@ -653,39 +653,11 @@ export class SymbolParser implements ISymbolParser {
653
653
const { jsDoc } = node as {
654
654
jsDoc : JSDocInfoType [ ] ;
655
655
} ;
656
- const docs : {
657
- descriptions : string [ ] ;
658
- tags : string [ ] ;
659
- } = jsDoc . reduce (
660
- (
661
- acc : {
662
- descriptions : string [ ] ;
663
- tags : string [ ] ;
664
- } ,
665
- { comment, tags } ,
666
- ) => {
667
- const newTags = tags
668
- ? tags . map ( ( { comment, name, tagName } ) => {
669
- const text = name ?. getText ( ) ;
670
- return `* @${ tagName . text } ${ `${ text ? ` ${ text } ` : '' } ` } ${
671
- comment ? ` ${ comment } ` : ''
672
- } `;
673
- } )
674
- : [ ] ;
675
- return {
676
- descriptions : comment
677
- ? [ ...acc . descriptions , comment ]
678
- : acc . descriptions ,
679
- tags : [ ...acc . tags , ...newTags ] ,
680
- } ;
681
- } ,
682
- {
683
- descriptions : [ ] ,
684
- tags : [ ] ,
685
- } ,
686
- ) ;
687
- if ( docs . descriptions . length ) {
688
- prop . description = cleanJSDocText ( docs . descriptions . join ( '' ) ) ;
656
+ const docs : string [ ] = jsDoc . reduce ( ( acc : string [ ] , { comment } ) => {
657
+ return comment ? [ ...acc , comment ] : acc ;
658
+ } , [ ] ) ;
659
+ if ( docs . length ) {
660
+ prop . description = cleanJSDocText ( docs . join ( '' ) ) ;
689
661
}
690
662
const merged = mergeJSDoc ( this , prop , node ) ;
691
663
if ( merged === null ) {
You can’t perform that action at this time.
0 commit comments