File tree 3 files changed +15
-0
lines changed
crates/swc_ecma_transforms_base
tests/ts-resolver/issues/6533
3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -974,8 +974,10 @@ impl<'a> VisitMut for Resolver<'a> {
974
974
// Always resolve the import declaration identifiers even if it's type only.
975
975
// We need to analyze these identifiers for type stripping purposes.
976
976
self . ident_type = IdentType :: Binding ;
977
+ let old_in_type = self . in_type ;
977
978
self . in_type = n. type_only ;
978
979
n. visit_mut_children_with ( self ) ;
980
+ self . in_type = old_in_type;
979
981
}
980
982
981
983
fn visit_mut_import_named_specifier ( & mut self , s : & mut ImportNamedSpecifier ) {
Original file line number Diff line number Diff line change
1
+ import * as F from "foo" ;
2
+ import type { Thing } from "anywhere" ;
3
+ console . log ( F )
4
+
5
+ export const inner = < F > ( a : F ) => {
6
+ console . log ( F )
7
+ } ;
Original file line number Diff line number Diff line change
1
+ import * as F__1 from "foo" ;
2
+ import { Thing__1 } from "anywhere" ;
3
+ console . log ( F__1 ) ;
4
+ export const inner__1 = < F__3 > ( a__3 : F__3 ) => {
5
+ console . log ( F__1 ) ;
6
+ } ;
You can’t perform that action at this time.
0 commit comments