# mod.ts
export function test<T extends TypeParam = Default>(param: Param): Return {
}

class TypeParam {}
class Param {}
class Return {}
class Default {}

// the top two overloads should appear in the results
export function overloaded<T extends OverloadTypeParam>(param: OverloadParam): OverloadReturn;
export function overloaded(): string;
export function overloaded<T extends PrivateTypeParam>(param: PrivateParam): PrivateReturn {
}

class OverloadTypeParam {}
class OverloadParam {}
class OverloadReturn {}

class PrivateTypeParam {}
class PrivateParam {}
class PrivateReturn {}

# output
file:///mod.ts: EsModuleInfo {
    module_id: ModuleId(
        0,
    ),
    specifier: "file:///mod.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "test",
            #2,
        ): 1,
        (
            "TypeParam",
            #2,
        ): 2,
        (
            "Param",
            #2,
        ): 3,
        (
            "Return",
            #2,
        ): 4,
        (
            "Default",
            #2,
        ): 5,
        (
            "overloaded",
            #2,
        ): 6,
        (
            "OverloadTypeParam",
            #2,
        ): 7,
        (
            "OverloadParam",
            #2,
        ): 8,
        (
            "OverloadReturn",
            #2,
        ): 9,
        (
            "PrivateTypeParam",
            #2,
        ): 10,
        (
            "PrivateParam",
            #2,
        ): 11,
        (
            "PrivateReturn",
            #2,
        ): 12,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export function test<T extends TypeParam = Default>(param: Param): Return {\n}\n\nclass TypeParam {}\nclass Param {}\nclass Return {}\nclass Default {}\n\n// the top two overloads should appear in the results\nexport function overloaded<T extends OverloadTypeParam>(param: OverloadParam): OverloadReturn;\nexport function overloaded(): string;\nexport function overloaded<T extends PrivateTypeParam>(param: PrivateParam): PrivateReturn {\n}\n\nclass OverloadTypeParam {}\nclass OverloadParam {}\nclass OverloadReturn {}\n\nclass PrivateTypeParam {}\nclass PrivateParam {}\nclass PrivateReturn {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            575,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8,
                9,
                10,
                11,
                12,
            },
            exports: {
                "test": 1,
                "overloaded": 6,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export function test<T extends TypeParam = Default>(param: Param): Return {\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            77,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        2: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 2,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "class TypeParam {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            79,
                        ),
                        end: SourcePos(
                            97,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 3,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "class Param {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            98,
                        ),
                        end: SourcePos(
                            112,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        4: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 4,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "class Return {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            113,
                        ),
                        end: SourcePos(
                            128,
                        ),
                    },
                    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 Default {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            129,
                        ),
                        end: SourcePos(
                            145,
                        ),
                    },
                    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 function overloaded<T extends OverloadTypeParam>(param: OverloadParam): OverloadReturn;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            201,
                        ),
                        end: SourcePos(
                            295,
                        ),
                    },
                    flags: 0,
                },
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export function overloaded(): string;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            296,
                        ),
                        end: SourcePos(
                            333,
                        ),
                    },
                    flags: 0,
                },
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export function overloaded<T extends PrivateTypeParam>(param: PrivateParam): PrivateReturn {\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            334,
                        ),
                        end: SourcePos(
                            428,
                        ),
                    },
                    flags: 1,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        7: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 7,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "class OverloadTypeParam {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            430,
                        ),
                        end: SourcePos(
                            456,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        8: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 8,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "class OverloadParam {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            457,
                        ),
                        end: SourcePos(
                            479,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        9: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 9,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "class OverloadReturn {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            480,
                        ),
                        end: SourcePos(
                            503,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        10: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 10,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "class PrivateTypeParam {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            505,
                        ),
                        end: SourcePos(
                            530,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        11: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 11,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "class PrivateParam {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            531,
                        ),
                        end: SourcePos(
                            552,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        12: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 12,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "class PrivateReturn {}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            553,
                        ),
                        end: SourcePos(
                            575,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
== symbol deps (types and exprs) ==
1:0..77 [Id(("TypeParam", #2)), Id(("Default", #2)), Id(("Param", #2)), Id(("Return", #2))]
6:201..295 [Id(("OverloadTypeParam", #2)), Id(("OverloadParam", #2)), Id(("OverloadReturn", #2))]
6:334..428 [Id(("PrivateTypeParam", #2)), Id(("PrivateParam", #2)), Id(("PrivateReturn", #2))]

== symbol deps (types only) ==
1:0..77 [Id(("TypeParam", #2)), Id(("Default", #2)), Id(("Param", #2)), Id(("Return", #2))]
6:201..295 [Id(("OverloadTypeParam", #2)), Id(("OverloadParam", #2)), Id(("OverloadReturn", #2))]
6:334..428 [Id(("PrivateTypeParam", #2)), Id(("PrivateParam", #2)), Id(("PrivateReturn", #2))]

== export definitions ==
[test]: file:///mod.ts:0..77
  export function test<T extends TypeParam = Default>(param: Param): Return {
  }
[overloaded]: file:///mod.ts:201..295
  export function overloaded<T extends OverloadTypeParam>(param: OverloadParam): OverloadReturn;
file:///mod.ts:296..333
  export function overloaded(): string;
file:///mod.ts:334..428
  export function overloaded<T extends PrivateTypeParam>(param: PrivateParam): PrivateReturn {
  }
