summaryrefslogtreecommitdiff
path: root/cli/swc_util.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-06-10 14:19:41 +0200
committerGitHub <noreply@github.com>2020-06-10 14:19:41 +0200
commitdb70b77e4b6a24814e0045f7f6afcf77730878a7 (patch)
tree0aeb0ba674aa6cd2b978742993329616dafa80fc /cli/swc_util.rs
parentaf69f25319ba27226f4b79e7d4ed0190448a8b8b (diff)
fix: handle @deno-types in export {} (#6202)
* fix: handle @deno-types in export {} * lint * fix tests * fmt * fix test
Diffstat (limited to 'cli/swc_util.rs')
-rw-r--r--cli/swc_util.rs18
1 files changed, 5 insertions, 13 deletions
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();