# mod.ts
import { MyInterface } from "https://localhost/mod.js";
import { MyInterface2 } from "./other.js";
import { MyInterface3 } from "./typescript.ts";

export class MyClass implements MyInterface, MyInterface2, MyInterface3 {
}

# https://localhost/mod.js
HEADERS: {"x-typescript-types":"./mod.d.ts"}
export class Dummy {}

# https://localhost/mod.d.ts
export interface MyInterface {
  a: string;
}

export interface MyNonPublicInterface {
  a1: string;
}

# other.js
HEADERS: {"x-typescript-types":"./other.d.ts"}

# other.d.ts
export interface MyInterface2 {
  b: string;
}

# typescript.ts
export interface MyInterface3 {
  c: string;
}

# output
file:///mod.ts: EsModuleInfo {
    module_id: ModuleId(
        0,
    ),
    specifier: "file:///mod.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "MyInterface",
            #2,
        ): 1,
        (
            "MyInterface2",
            #2,
        ): 2,
        (
            "MyInterface3",
            #2,
        ): 3,
        (
            "MyClass",
            #2,
        ): 4,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "import { MyInterface } from \"https://localhost/mod.js\";\nimport { MyInterface2 } from \"./other.js\";\nimport { MyInterface3 } from \"./typescript.ts\";\n\nexport class MyClass implements MyInterface, MyInterface2, MyInterface3 {\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            223,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                4,
            },
            exports: {
                "MyClass": 4,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: FileRef(
                        FileDep {
                            name: Name(
                                "MyInterface",
                            ),
                            specifier: "https://localhost/mod.js",
                        },
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            9,
                        ),
                        end: SourcePos(
                            20,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        2: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 2,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: FileRef(
                        FileDep {
                            name: Name(
                                "MyInterface2",
                            ),
                            specifier: "./other.js",
                        },
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            65,
                        ),
                        end: SourcePos(
                            77,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 3,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: FileRef(
                        FileDep {
                            name: Name(
                                "MyInterface3",
                            ),
                            specifier: "./typescript.ts",
                        },
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            108,
                        ),
                        end: SourcePos(
                            120,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        4: Symbol {
            module_id: ModuleId(
                0,
            ),
            symbol_id: 4,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export class MyClass implements MyInterface, MyInterface2, MyInterface3 {\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            148,
                        ),
                        end: SourcePos(
                            223,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
== symbol deps (types and exprs) ==
4:148..223 [Id(("MyInterface", #2)), Id(("MyInterface2", #2)), Id(("MyInterface3", #2))]

== symbol deps (types only) ==
4:148..223 [Id(("MyInterface", #2)), Id(("MyInterface2", #2)), Id(("MyInterface3", #2))]

file:///other.d.ts: EsModuleInfo {
    module_id: ModuleId(
        1,
    ),
    specifier: "file:///other.d.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "MyInterface2",
            #2,
        ): 1,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyInterface2 {\n  b: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            46,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
            },
            exports: {
                "MyInterface2": 1,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyInterface2 {\n  b: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            46,
                        ),
                    },
                    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(
                            "b: string;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            34,
                        ),
                        end: SourcePos(
                            44,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
file:///other.js: EsModuleInfo {
    module_id: ModuleId(
        1,
    ),
    specifier: "file:///other.d.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "MyInterface2",
            #2,
        ): 1,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyInterface2 {\n  b: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            46,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
            },
            exports: {
                "MyInterface2": 1,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                1,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyInterface2 {\n  b: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            46,
                        ),
                    },
                    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(
                            "b: string;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            34,
                        ),
                        end: SourcePos(
                            44,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
file:///typescript.ts: EsModuleInfo {
    module_id: ModuleId(
        2,
    ),
    specifier: "file:///typescript.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "MyInterface3",
            #2,
        ): 1,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                2,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyInterface3 {\n  c: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            46,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
            },
            exports: {
                "MyInterface3": 1,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                2,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyInterface3 {\n  c: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            46,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {
                2,
            },
        },
        2: Symbol {
            module_id: ModuleId(
                2,
            ),
            symbol_id: 2,
            parent_id: Some(
                1,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "c: string;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            34,
                        ),
                        end: SourcePos(
                            44,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
https://localhost/mod.d.ts: EsModuleInfo {
    module_id: ModuleId(
        3,
    ),
    specifier: "https://localhost/mod.d.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "MyInterface",
            #2,
        ): 1,
        (
            "MyNonPublicInterface",
            #2,
        ): 3,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                3,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyInterface {\n  a: string;\n}\n\nexport interface MyNonPublicInterface {\n  a1: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            102,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
                3,
            },
            exports: {
                "MyInterface": 1,
                "MyNonPublicInterface": 3,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                3,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyInterface {\n  a: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            45,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {
                2,
            },
        },
        2: Symbol {
            module_id: ModuleId(
                3,
            ),
            symbol_id: 2,
            parent_id: Some(
                1,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "a: string;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            33,
                        ),
                        end: SourcePos(
                            43,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                3,
            ),
            symbol_id: 3,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyNonPublicInterface {\n  a1: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            47,
                        ),
                        end: SourcePos(
                            102,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {
                4,
            },
        },
        4: Symbol {
            module_id: ModuleId(
                3,
            ),
            symbol_id: 4,
            parent_id: Some(
                3,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "a1: string;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            89,
                        ),
                        end: SourcePos(
                            100,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
https://localhost/mod.js: EsModuleInfo {
    module_id: ModuleId(
        3,
    ),
    specifier: "https://localhost/mod.d.ts",
    re_exports: [],
    swc_id_to_symbol_id: {
        (
            "MyInterface",
            #2,
        ): 1,
        (
            "MyNonPublicInterface",
            #2,
        ): 3,
    },
    symbols: {
        0: Symbol {
            module_id: ModuleId(
                3,
            ),
            symbol_id: 0,
            parent_id: None,
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyInterface {\n  a: string;\n}\n\nexport interface MyNonPublicInterface {\n  a1: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            102,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {
                1,
                3,
            },
            exports: {
                "MyInterface": 1,
                "MyNonPublicInterface": 3,
            },
            members: {},
        },
        1: Symbol {
            module_id: ModuleId(
                3,
            ),
            symbol_id: 1,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyInterface {\n  a: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            0,
                        ),
                        end: SourcePos(
                            45,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {
                2,
            },
        },
        2: Symbol {
            module_id: ModuleId(
                3,
            ),
            symbol_id: 2,
            parent_id: Some(
                1,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "a: string;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            33,
                        ),
                        end: SourcePos(
                            43,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
        3: Symbol {
            module_id: ModuleId(
                3,
            ),
            symbol_id: 3,
            parent_id: Some(
                0,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "export interface MyNonPublicInterface {\n  a1: string;\n}",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            47,
                        ),
                        end: SourcePos(
                            102,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {
                4,
            },
        },
        4: Symbol {
            module_id: ModuleId(
                3,
            ),
            symbol_id: 4,
            parent_id: Some(
                3,
            ),
            decls: [
                SymbolDecl {
                    kind: Definition(
                        SymbolNode(
                            "a1: string;",
                        ),
                    ),
                    range: SourceRange {
                        start: SourcePos(
                            89,
                        ),
                        end: SourcePos(
                            100,
                        ),
                    },
                    flags: 0,
                },
            ],
            child_ids: {},
            exports: {},
            members: {},
        },
    },
}
== export definitions ==
[MyClass]: file:///mod.ts:148..223
  export class MyClass implements MyInterface, MyInterface2, MyInterface3 {
  }
