# mod.ts
import * as other from "./other.ts";

namespace Test {
  export function test() {}
}

export import Resolved = Test.test;
export import Unresolved = Test.NotFound;

export { NonExistent } from "./other.ts";

export import NonExistent2 = other.NotFound;

# other.ts
export class Other {}

# output
file:///mod.ts: EsModuleInfo {
    module_id: ModuleId(
        0,
    ),
    specifier: "file:///mod.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "other",
            #2,
        ): 1,
        (
            "Test",
            #2,
        ): 2,
        (
            "test",
            #3,
        ): 3,
        (
            "Resolved",
            #2,
        ): 4,
        (
            "Unresolved",
            #2,
        ): 5,
        (
            "NonExistent2",
            #2,
        ): 7,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "import * as other from \"./other.ts\";\n\nnamespace Test {\n  export function test() {}\n}\n\nexport import Resolved = Test.test;\nexport import Unresolved = Test.NotFound;\n\nexport { NonExistent } from \"./other.ts\";\n\nexport import NonExistent2 = other.NotFound;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            252,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                2,
            },
            exports: {
                "Resolved": 4,
                "Unresolved": 5,
                "NonExistent": 6,
                "NonExistent2": 7,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: FileRef(
                        FileDep {
                            name: Star,
                            specifier: "./other.ts",
                        },
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            7,
                        ),
                        end: SourcePos(
                            17,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        2: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 2,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "namespace Test {\n  export function test() {}\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            38,
                        ),
                        end: SourcePos(
                            84,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                3,
            },
            exports: {
                "test": 3,
            },
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 3,
            parent_id: Some(
                2,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export function test() {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            57,
                        ),
                        end: SourcePos(
                            82,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        4: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 4,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: QualifiedTarget(
                        (
                            "Test",
                            #2,
                        ),
                        [
                            "test",
                        ],
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            86,
                        ),
                        end: SourcePos(
                            121,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        5: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 5,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: QualifiedTarget(
                        (
                            "Test",
                            #2,
                        ),
                        [
                            "NotFound",
                        ],
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            122,
                        ),
                        end: SourcePos(
                            163,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        6: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 6,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: FileRef(
                        FileDep {
                            name: Name(
                                "NonExistent",
                            ),
                            specifier: "./other.ts",
                        },
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            174,
                        ),
                        end: SourcePos(
                            185,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        7: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 7,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: QualifiedTarget(
                        (
                            "other",
                            #2,
                        ),
                        [
                            "NotFound",
                        ],
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            208,
                        ),
                        end: SourcePos(
                            252,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
file:///other.ts: EsModuleInfo {
    module_id: ModuleId(
        1,
    ),
    specifier: "file:///other.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "Other",
            #2,
        ): 1,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export class Other {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            21,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
            },
            exports: {
                "Other": 1,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export class Other {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            21,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
== export definitions ==
[Resolved]: file:///mod.ts:57..82
  export function test() {}
[Unresolved]: file:///mod.ts
  Unresolved Part("NotFound") (["NotFound"])
[NonExistent]: file:///other.ts
  Unresolved Part("NonExistent") ([])
[NonExistent2]: file:///other.ts
  Unresolved Part("NotFound") (["NotFound"])
