# mod.ts
declare function foo(): void;
declare namespace Test {
  function test(): void;
  export { test };
}
class Other {}
declare class MyClass {
  method(): void;
  prop: Other;
}
import inner = Test.test;
export { foo as bar, inner as baz, MyClass };

# output
file:///mod.ts: EsModuleInfo {
    module_id: ModuleId(
        0,
    ),
    specifier: "file:///mod.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "foo",
            #2,
        ): 1,
        (
            "Test",
            #2,
        ): 2,
        (
            "test",
            #4,
        ): 3,
        (
            "Other",
            #2,
        ): 5,
        (
            "MyClass",
            #2,
        ): 6,
        (
            "inner",
            #2,
        ): 9,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "declare function foo(): void;\ndeclare namespace Test {\n  function test(): void;\n  export { test };\n}\nclass Other {}\ndeclare class MyClass {\n  method(): void;\n  prop: Other;\n}\nimport inner = Test.test;\nexport { foo as bar, inner as baz, MyClass };",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            246,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
                2,
                5,
                6,
            },
            exports: {
                "bar": 10,
                "baz": 11,
                "MyClass": 12,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "declare function foo(): void;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            29,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        2: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 2,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "declare namespace Test {\n  function test(): void;\n  export { test };\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            30,
                        ),
                        end: SourcePos(
                            100,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                3,
            },
            exports: {
                "test": 4,
            },
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 3,
            parent_id: Some(
                2,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "function test(): void;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            57,
                        ),
                        end: SourcePos(
                            79,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        4: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 4,
            parent_id: Some(
                2,
            ),
            decls: [
                SymbolDecl {
                    kind: Target(
                        (
                            "test",
                            #4,
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            91,
                        ),
                        end: SourcePos(
                            95,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        5: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 5,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "class Other {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            101,
                        ),
                        end: SourcePos(
                            115,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        6: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 6,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "declare class MyClass {\n  method(): void;\n  prop: Other;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            116,
                        ),
                        end: SourcePos(
                            174,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {
                7,
                8,
            },
        },
        7: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 7,
            parent_id: Some(
                6,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "method(): void;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            142,
                        ),
                        end: SourcePos(
                            157,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        8: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 8,
            parent_id: Some(
                6,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "prop: Other;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            160,
                        ),
                        end: SourcePos(
                            172,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        9: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 9,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: QualifiedTarget(
                        (
                            "Test",
                            #2,
                        ),
                        [
                            "test",
                        ],
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            175,
                        ),
                        end: SourcePos(
                            200,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        10: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 10,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Target(
                        (
                            "foo",
                            #2,
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            210,
                        ),
                        end: SourcePos(
                            220,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        11: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 11,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Target(
                        (
                            "inner",
                            #2,
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            222,
                        ),
                        end: SourcePos(
                            234,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        12: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 12,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Target(
                        (
                            "MyClass",
                            #2,
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            236,
                        ),
                        end: SourcePos(
                            243,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
== symbol deps (types and exprs) ==
8:160..172 [Id(("Other", #2))]

== symbol deps (types only) ==
8:160..172 [Id(("Other", #2))]

== export definitions ==
[bar]: file:///mod.ts:0..29
  declare function foo(): void;
[baz]: file:///mod.ts:57..79
  function test(): void;
[MyClass]: file:///mod.ts:116..174
  declare class MyClass {
    method(): void;
    prop: Other;
  }
