File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ module.exports = function(src, options = {}) {
16
16
17
17
// Determine whether to skip "type-only" imports
18
18
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#import-types
19
+ // https://www.typescriptlang.org/v2/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export
19
20
const skipTypeImports = Boolean ( options . skipTypeImports ) ;
20
21
// Remove skipTypeImports option, as this option may not be recognized by the walker/parser
21
22
delete walkerOptions . skipTypeImports ;
@@ -43,6 +44,9 @@ module.exports = function(src, options = {}) {
43
44
}
44
45
break ;
45
46
case 'ImportDeclaration' :
47
+ if ( skipTypeImports && node . importKind == 'type' ) {
48
+ break ;
49
+ }
46
50
if ( node . source && node . source . value ) {
47
51
dependencies . push ( node . source . value ) ;
48
52
}
You can’t perform that action at this time.
0 commit comments