We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
valid-types
1 parent 0e0e288 commit 28fa65dCopy full SHA for 28fa65d
src/rules/validTypes.js
@@ -164,8 +164,8 @@ export default iterateJsdoc(({
164
165
if (
166
(typ === 'JsdocTypeObjectField' || typ === 'JsdocTypeKeyValue') &&
167
- node.right.type === 'JsdocTypeNullable' &&
168
- node.right.meta.position === 'suffix'
+ node.right?.type === 'JsdocTypeNullable' &&
+ node.right?.meta?.position === 'suffix'
169
) {
170
report(`Syntax error in type: ${node.right.type}`, null, tag);
171
}
test/rules/assertions/validTypes.js
@@ -1783,5 +1783,12 @@ export default {
1783
},
1784
1785
1786
+ {
1787
+ code: `
1788
+ /**
1789
+ * @returns {Promise<{publicKey, privateKey}>} - The public and private key
1790
+ */
1791
+ `,
1792
+ },
1793
],
1794
};
0 commit comments