File tree Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -1020,5 +1020,14 @@ const otherFile = require('./other-file');
10201020 * @param {otherFile.MyType} a
10211021 */
10221022function f(a ) {}
1023+
1024+ /** @typedef {import('restify').Request} Request */
1025+ /** @typedef {import('./types').helperError} helperError */
1026+
1027+ /**
1028+ * @param {Request} b
1029+ * @param {helperError} c
1030+ */
1031+ function a (b , c ) {}
10231032````
10241033
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ export default iterateJsdoc(({
115115 const allComments = sourceCode . getAllComments ( ) ;
116116 const comments = allComments
117117 . filter ( ( comment ) => {
118- return ( / ^ \* \s / v) . test ( comment . value ) ;
118+ return ( / ^ \* (? ! \* ) / v) . test ( comment . value ) ;
119119 } )
120120 . map ( ( commentNode ) => {
121121 return parseComment ( commentNode , '' ) ;
Original file line number Diff line number Diff line change @@ -633,6 +633,24 @@ export default /** @type {import('../index.js').TestCases} */ ({
633633 } ,
634634 ] ,
635635 } ,
636+ {
637+ code : `
638+ /*** @typedef {object} SomeType */
639+ /**
640+ * @param {SomeType} foo - Bar.
641+ */
642+ function quux(foo) {
643+
644+ }
645+ ` ,
646+ errors : [
647+ {
648+ line : 4 ,
649+ message : 'The type \'SomeType\' is undefined.' ,
650+ } ,
651+ ] ,
652+ ignoreReadme : true ,
653+ } ,
636654 ] ,
637655 valid : [
638656 {
@@ -1740,5 +1758,17 @@ export default /** @type {import('../index.js').TestCases} */ ({
17401758 function f(a) {}
17411759 ` ,
17421760 } ,
1761+ {
1762+ code : `
1763+ /**@typedef {import('restify').Request} Request */
1764+ /**@typedef {import('./types').helperError} helperError */
1765+
1766+ /**
1767+ * @param {Request} b
1768+ * @param {helperError} c
1769+ */
1770+ function a (b, c) {}
1771+ ` ,
1772+ } ,
17431773 ] ,
17441774} ) ;
You can’t perform that action at this time.
0 commit comments