File tree 3 files changed +550
-448
lines changed 3 files changed +550
-448
lines changed Original file line number Diff line number Diff line change @@ -449,17 +449,21 @@ function getExports(
449
449
node : ts . SourceFile | ts . ModuleBlock ,
450
450
symbol : ts . Symbol | undefined
451
451
) : ts . Symbol [ ] {
452
+ const exports : ts . Symbol [ ] = [ ] ;
453
+
452
454
// The generated docs aren't great, but you really ought not be using
453
455
// this in the first place... so it's better than nothing.
454
456
const exportEq = symbol ?. exports ?. get ( "export=" as ts . __String ) ;
455
457
if ( exportEq ) {
456
- return [ exportEq ] ;
458
+ exports . push ( exportEq ) ;
457
459
}
458
460
459
461
if ( symbol ) {
460
- return context . checker
461
- . getExportsOfModule ( symbol )
462
- . filter ( ( s ) => ! hasFlag ( s . flags , ts . SymbolFlags . Prototype ) ) ;
462
+ return exports . concat (
463
+ context . checker
464
+ . getExportsOfModule ( symbol )
465
+ . filter ( ( s ) => ! hasFlag ( s . flags , ts . SymbolFlags . Prototype ) )
466
+ ) ;
463
467
}
464
468
465
469
// Global file with no inferred top level symbol, get all symbols declared in this file.
Original file line number Diff line number Diff line change
1
+ /** @typedef {string } Foo */
2
+
3
+ /** @param {Foo } x */
4
+ const foo = ( x ) => x ;
5
+
6
+ module . exports = foo ;
You can’t perform that action at this time.
0 commit comments