Skip to content

Commit 95aba28

Browse files
committed
Simplify by using flatMap
1 parent b2e9c9b commit 95aba28

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
@@ -71,12 +71,12 @@ export default iterateJsdoc(({
7171
let closureGenericTypes = [];
7272
const classJsdoc = utils.getClassJsdoc();
7373
if (classJsdoc && classJsdoc.tags) {
74-
classJsdoc.tags
74+
closureGenericTypes = classJsdoc.tags
7575
.filter((tag) => {
7676
return tag.tag === 'template';
7777
})
78-
.forEach((tag) => {
79-
closureGenericTypes = closureGenericTypes.concat(jsdocUtils.parseClosureTemplateTag(tag));
78+
.flatMap((tag) => {
79+
return jsdocUtils.parseClosureTemplateTag(tag);
8080
});
8181
}
8282

0 commit comments

Comments
 (0)