From db70b77e4b6a24814e0045f7f6afcf77730878a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 10 Jun 2020 14:19:41 +0200 Subject: fix: handle @deno-types in export {} (#6202) * fix: handle @deno-types in export {} * lint * fix tests * fmt * fix test --- cli/swc_util.rs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'cli/swc_util.rs') diff --git a/cli/swc_util.rs b/cli/swc_util.rs index eb41fbc34..77ac6d083 100644 --- a/cli/swc_util.rs +++ b/cli/swc_util.rs @@ -504,19 +504,11 @@ pub fn analyze_dependencies_and_references( }) .map(|desc| { let location = parser.get_span_location(desc.span); - if desc.kind == DependencyKind::Import { - let deno_types = get_deno_types(&parser, desc.span); - ImportDescriptor { - specifier: desc.specifier.to_string(), - deno_types, - location: location.into(), - } - } else { - ImportDescriptor { - specifier: desc.specifier.to_string(), - deno_types: None, - location: location.into(), - } + let deno_types = get_deno_types(&parser, desc.span); + ImportDescriptor { + specifier: desc.specifier.to_string(), + deno_types, + location: location.into(), } }) .collect(); -- cgit v1.2.3