# mod.ts
function myFunc() {}

myFunc["str"] = true;
myFunc["invalid-name"] = "not expando";
myFunc.skip = () => {};
myFunc.prop = "";

export namespace myNamespace {}
myNamespace.value = ""; // not expando
export class myClass {}
myClass.value = ""; // not expando

export { myFunc };

# output
file:///mod.ts: EsModuleInfo {
    module_id: ModuleId(
        0,
    ),
    specifier: "file:///mod.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "myFunc",
            #2,
        ): 1,
        (
            "myNamespace",
            #2,
        ): 5,
        (
            "myClass",
            #2,
        ): 6,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "function myFunc() {}\n\nmyFunc[\"str\"] = true;\nmyFunc[\"invalid-name\"] = \"not expando\";\nmyFunc.skip = () => {};\nmyFunc.prop = \"\";\n\nexport namespace myNamespace {}\nmyNamespace.value = \"\"; // not expando\nexport class myClass {}\nmyClass.value = \"\"; // not expando\n\nexport { myFunc };",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            276,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
                5,
                6,
            },
            exports: {
                "myNamespace": 5,
                "myClass": 6,
                "myFunc": 7,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "function myFunc() {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            20,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                2,
                3,
                4,
            },
            exports: {
                "str": 2,
                "skip": 3,
                "prop": 4,
            },
            members: {},
        },
        2: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 2,
            parent_id: Some(
                1,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "myFunc[\"str\"] = true",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            22,
                        ),
                        end: SourcePos(
                            42,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 3,
            parent_id: Some(
                1,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "myFunc.skip = () => {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            84,
                        ),
                        end: SourcePos(
                            106,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        4: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 4,
            parent_id: Some(
                1,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "myFunc.prop = \"\"",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            108,
                        ),
                        end: SourcePos(
                            124,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        5: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 5,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export namespace myNamespace {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            127,
                        ),
                        end: SourcePos(
                            158,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        6: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 6,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export class myClass {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            198,
                        ),
                        end: SourcePos(
                            221,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        7: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 7,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Target(
                        (
                            "myFunc",
                            #2,
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            267,
                        ),
                        end: SourcePos(
                            273,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
== export definitions ==
[myNamespace]: file:///mod.ts:127..158
  export namespace myNamespace {}
[myClass]: file:///mod.ts:198..221
  export class myClass {}
[myFunc]: file:///mod.ts:0..20
  function myFunc() {}
