# mod.ts
import A = require("./a.ts");

export default A;

# a.ts
namespace MyNamespace {
  export function B() {}
}

export = MyNamespace;

# output
file:///a.ts: EsModuleInfo {
    module_id: ModuleId(
        1,
    ),
    specifier: "file:///a.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "MyNamespace",
            #2,
        ): 1,
        (
            "B",
            #3,
        ): 2,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "namespace MyNamespace {\n  export function B() {}\n}\n\nexport = MyNamespace;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            73,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
            },
            exports: {
                "default": 3,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "namespace MyNamespace {\n  export function B() {}\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            50,
                        ),
                    },
                    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(
                            "export function B() {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            26,
                        ),
                        end: SourcePos(
                            48,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 3,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Target(
                        (
                            "MyNamespace",
                            #2,
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            61,
                        ),
                        end: SourcePos(
                            72,
                        ),
                    },
                    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,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "import A = require(\"./a.ts\");\n\nexport default A;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            48,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {
                "default": 2,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: FileRef(
                        FileDep {
                            name: Name(
                                "default",
                            ),
                            specifier: "./a.ts",
                        },
                    ),
                    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: Target(
                        (
                            "A",
                            #2,
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            46,
                        ),
                        end: SourcePos(
                            47,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
== export definitions ==
[default]: file:///a.ts:0..50
  namespace MyNamespace {
    export function B() {}
  }
