# mod.ts
import { A } from "./a.ts";

export import MyExport = Test.Inner;

namespace Test {
  import OtherInner = A.B.Other;
  export { OtherInner as Inner };
}

# a.ts
namespace A.B {
  export interface Other {
    prop1: string;
  }
  export interface Other {
    prop2: string;
  }
  export namespace Other {
    export class MyTest {
    }
  }
}

export { A };

# output
file:///a.ts: EsModuleInfo {
    module_id: ModuleId(
        1,
    ),
    specifier: "file:///a.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "A",
            #2,
        ): 1,
        (
            "B",
            #3,
        ): 2,
        (
            "Other",
            #3,
        ): 3,
        (
            "MyTest",
            #4,
        ): 6,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "namespace A.B {\n  export interface Other {\n    prop1: string;\n  }\n  export interface Other {\n    prop2: string;\n  }\n  export namespace Other {\n    export class MyTest {\n    }\n  }\n}\n\nexport { A };",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            195,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
            },
            exports: {
                "A": 7,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "namespace A.B {\n  export interface Other {\n    prop1: string;\n  }\n  export interface Other {\n    prop2: string;\n  }\n  export namespace Other {\n    export class MyTest {\n    }\n  }\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            180,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                2,
            },
            exports: {
                "B": 2,
            },
            members: {},
        },
        2: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 2,
            parent_id: Some(
                1,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "namespace A.B {\n  export interface Other {\n    prop1: string;\n  }\n  export interface Other {\n    prop2: string;\n  }\n  export namespace Other {\n    export class MyTest {\n    }\n  }\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            12,
                        ),
                        end: SourcePos(
                            180,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                3,
            },
            exports: {
                "Other": 3,
            },
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 3,
            parent_id: Some(
                2,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface Other {\n    prop1: string;\n  }",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            18,
                        ),
                        end: SourcePos(
                            65,
                        ),
                    },
                    flags: 0,
                },
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface Other {\n    prop2: string;\n  }",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            68,
                        ),
                        end: SourcePos(
                            115,
                        ),
                    },
                    flags: 0,
                },
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export namespace Other {\n    export class MyTest {\n    }\n  }",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            118,
                        ),
                        end: SourcePos(
                            178,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                6,
            },
            exports: {
                "MyTest": 6,
            },
            members: {
                4,
                5,
            },
        },
        4: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 4,
            parent_id: Some(
                3,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "prop1: string;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            47,
                        ),
                        end: SourcePos(
                            61,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        5: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 5,
            parent_id: Some(
                3,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "prop2: string;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            97,
                        ),
                        end: SourcePos(
                            111,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        6: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 6,
            parent_id: Some(
                3,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export class MyTest {\n    }",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            147,
                        ),
                        end: SourcePos(
                            174,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        7: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 7,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Target(
                        (
                            "A",
                            #2,
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            191,
                        ),
                        end: SourcePos(
                            192,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
file:///mod.ts: EsModuleInfo {
    module_id: ModuleId(
        0,
    ),
    specifier: "file:///mod.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "A",
            #2,
        ): 1,
        (
            "MyExport",
            #2,
        ): 2,
        (
            "Test",
            #2,
        ): 3,
        (
            "OtherInner",
            #3,
        ): 4,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "import { A } from \"./a.ts\";\n\nexport import MyExport = Test.Inner;\n\nnamespace Test {\n  import OtherInner = A.B.Other;\n  export { OtherInner as Inner };\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            152,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                3,
            },
            exports: {
                "MyExport": 2,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: FileRef(
                        FileDep {
                            name: Name(
                                "A",
                            ),
                            specifier: "./a.ts",
                        },
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            9,
                        ),
                        end: SourcePos(
                            10,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        2: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 2,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: QualifiedTarget(
                        (
                            "Test",
                            #2,
                        ),
                        [
                            "Inner",
                        ],
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            29,
                        ),
                        end: SourcePos(
                            65,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 3,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "namespace Test {\n  import OtherInner = A.B.Other;\n  export { OtherInner as Inner };\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            67,
                        ),
                        end: SourcePos(
                            152,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {
                "Inner": 5,
            },
            members: {},
        },
        4: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 4,
            parent_id: Some(
                3,
            ),
            decls: [
                SymbolDecl {
                    kind: QualifiedTarget(
                        (
                            "A",
                            #2,
                        ),
                        [
                            "B",
                            "Other",
                        ],
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            86,
                        ),
                        end: SourcePos(
                            116,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        5: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 5,
            parent_id: Some(
                3,
            ),
            decls: [
                SymbolDecl {
                    kind: Target(
                        (
                            "OtherInner",
                            #3,
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            128,
                        ),
                        end: SourcePos(
                            147,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
== export definitions ==
[MyExport]: file:///a.ts:18..65
  export interface Other {
      prop1: string;
    }
file:///a.ts:68..115
  export interface Other {
      prop2: string;
    }
file:///a.ts:118..178
  export namespace Other {
      export class MyTest {
      }
    }
