# declaration.d.ts
export class Test {
  method(): typeof publicVar;
}

declare function random(): number;
declare var publicVar: number;

# mod.ts
import "./declaration.d.ts"

# output
file:///declaration.d.ts: EsModuleInfo {
    module_id: ModuleId(
        1,
    ),
    specifier: "file:///declaration.d.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "Test",
            #2,
        ): 1,
        (
            "random",
            #2,
        ): 3,
        (
            "publicVar",
            #2,
        ): 4,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export class Test {\n  method(): typeof publicVar;\n}\n\ndeclare function random(): number;\ndeclare var publicVar: number;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            118,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
                3,
                4,
            },
            exports: {
                "Test": 1,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export class Test {\n  method(): typeof publicVar;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            51,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {
                2,
            },
        },
        2: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 2,
            parent_id: Some(
                1,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "method(): typeof publicVar;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            22,
                        ),
                        end: SourcePos(
                            49,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 3,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "declare function random(): number;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            53,
                        ),
                        end: SourcePos(
                            87,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        4: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 4,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "publicVar: declare var publicVar: number;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            100,
                        ),
                        end: SourcePos(
                            117,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
== symbol deps (types and exprs) ==
2:22..49 [Id(("publicVar", #2))]

== symbol deps (types only) ==
2:22..49 [Id(("publicVar", #2))]

file:///mod.ts: EsModuleInfo {
    module_id: ModuleId(
        0,
    ),
    specifier: "file:///mod.ts",
    re_exports: [],
    swc_id_to_symbol_id: {},
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "import \"./declaration.d.ts\"",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            27,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
