Skip to content

Commit

Permalink
Fix use reduce instead of flat
Browse files Browse the repository at this point in the history
flat() can use Node.js v11.0.0
  • Loading branch information
heavenshell committed Mar 4, 2020
1 parent 1ba8fb8 commit 0593d74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/getTypeCheckDiagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function getTypeCheckDiagnostics(
const { diagnostics } = visitSource(checker, typeRegExpChecker, source)
return diagnostics
})
.flat()
.reduce((acc, val) => acc.concat(val), [])
return {
allDiagnostics
}
Expand Down

0 comments on commit 0593d74

Please sign in to comment.