File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export default iterateJsdoc(({
11
11
sourceCode
12
12
} ) => {
13
13
const scopeManager = sourceCode . scopeManager ;
14
- const globalScope = scopeManager . isModule ( ) ? scopeManager . globalScope . childScopes [ 0 ] : scopeManager . globalScope ;
14
+ const globalScope = scopeManager . globalScope ;
15
15
16
16
const typedefDeclarations = _ ( context . getAllComments ( ) )
17
17
. filter ( ( comment ) => {
@@ -31,6 +31,11 @@ export default iterateJsdoc(({
31
31
const definedTypes = globalScope . variables . map ( ( variable ) => {
32
32
return variable . name ;
33
33
} )
34
+
35
+ // If the file is a module, concat the variables from the module scope.
36
+ . concat ( scopeManager . isModule ( ) ? globalScope . childScopes [ 0 ] . variables . map ( ( variable ) => {
37
+ return variable . name ;
38
+ } ) : [ ] )
34
39
. concat ( extraTypes )
35
40
. concat ( typedefDeclarations ) ;
36
41
Original file line number Diff line number Diff line change @@ -67,8 +67,10 @@ export default {
67
67
68
68
/**
69
69
* @param {MyType} foo - Bar.
70
+ * @param {Object<string, number>} foo
71
+ * @param {Array<string>} baz
70
72
*/
71
- function quux(foo) {
73
+ function quux(foo, bar, baz ) {
72
74
73
75
}
74
76
` ,
You can’t perform that action at this time.
0 commit comments