mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
close: #7338 close: #7344 The `SymbolFlags::Export` is Initially used to solve `ExportSpecifier` that is not `IdentifierReference` that causes we cannot determine whether a Binding is not used everywhere by `Semantic`. Since #3820 this problem is solved, so we don't need `SymbolFlags::Export` no longer. Also, removing this can help us easier to pass the `Semantic` check in `Transformer`
24 lines
639 B
Rust
24 lines
639 B
Rust
use oxc_semantic::SymbolFlags;
|
|
|
|
use crate::util::SemanticTester;
|
|
|
|
#[test]
|
|
fn test_import_assignment() {
|
|
SemanticTester::ts("import Foo = require('./foo')")
|
|
.has_root_symbol("Foo")
|
|
.contains_flags(SymbolFlags::Import)
|
|
.test();
|
|
|
|
SemanticTester::ts("import { Foo } from './foo'; import Baz = Foo.Bar.Baz")
|
|
.has_root_symbol("Baz")
|
|
.contains_flags(SymbolFlags::Import)
|
|
.test();
|
|
}
|
|
|
|
#[test]
|
|
fn test_import_type() {
|
|
SemanticTester::ts(r#"import { type "<A>" as someA } from './a'; "#)
|
|
.has_root_symbol("someA")
|
|
.contains_flags(SymbolFlags::TypeImport)
|
|
.test();
|
|
}
|