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(({
1111 sourceCode
1212} ) => {
1313 const scopeManager = sourceCode . scopeManager ;
14- const globalScope = scopeManager . isModule ( ) ? scopeManager . globalScope . childScopes [ 0 ] : scopeManager . globalScope ;
14+ const globalScope = scopeManager . globalScope ;
1515
1616 const typedefDeclarations = _ ( context . getAllComments ( ) )
1717 . filter ( ( comment ) => {
@@ -31,6 +31,11 @@ export default iterateJsdoc(({
3131 const definedTypes = globalScope . variables . map ( ( variable ) => {
3232 return variable . name ;
3333 } )
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+ } ) : [ ] )
3439 . concat ( extraTypes )
3540 . concat ( typedefDeclarations ) ;
3641
Original file line number Diff line number Diff line change @@ -67,8 +67,10 @@ export default {
6767
6868 /**
6969 * @param {MyType} foo - Bar.
70+ * @param {Object<string, number>} foo
71+ * @param {Array<string>} baz
7072 */
71- function quux(foo) {
73+ function quux(foo, bar, baz ) {
7274
7375 }
7476 ` ,
You can’t perform that action at this time.
0 commit comments