Skip to content

Commit 7a5cc9d

Browse files
authored
Simplify by using flatMap
1 parent 9ebff2a commit 7a5cc9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rules/noUndefinedTypes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ export default iterateJsdoc(({
6464
let closureGenericTypes = [];
6565
const classJsdoc = utils.getClassJsdoc();
6666
if (classJsdoc && classJsdoc.tags) {
67-
classJsdoc.tags
67+
closureGenericTypes = classJsdoc.tags
6868
.filter((tag) => {
6969
return tag.tag === 'template';
7070
})
71-
.forEach((tag) => {
72-
closureGenericTypes = closureGenericTypes.concat(jsdocUtils.parseClosureTemplateTag(tag));
71+
.flatMap((tag) => {
72+
return jsdocUtils.parseClosureTemplateTag(tag);
7373
});
7474
}
7575

0 commit comments

Comments
 (0)