diff --git a/scripts/check-type-dependencies.js b/scripts/check-type-dependencies.js index f3862214a1..59594d9cda 100755 --- a/scripts/check-type-dependencies.js +++ b/scripts/check-type-dependencies.js @@ -85,9 +85,10 @@ function checkTypes(pkg) { resolvePath(pkg.location, 'dist/index.d.ts'), 'utf8', ); - const deps = (typeDecl.match(/from '.*'/g) || []) + const allDeps = (typeDecl.match(/from '.*'/g) || []) .map(match => match.replace(/from '(.*)'/, '$1')) .filter(n => !n.startsWith('.')); + const deps = Array.from(new Set(allDeps)); const errors = []; const typeDeps = [];