# https://jsr.io/@scope/a/meta.json
{"versions": { "1.0.0": {} } }

# https://jsr.io/@scope/a/1.0.0_meta.json
{ "exports": { ".": "./mod.js", "./foo": "./foo.js" } }

# https://jsr.io/@scope/a/1.0.0/other.d.ts
export class Other {}

# https://jsr.io/@scope/a/1.0.0/mod.d.ts
import { Other } from "./other.d.ts"; // will be removed because not used

export class Test {
  prop: typeof random;
  method(): typeof public;
  static prop: number;
}

declare function random(): number;

declare var private: number; // will be removed
declare var public: number;

# https://jsr.io/@scope/a/1.0.0/mod.js
/// <reference types="./mod.d.ts" />
export class Test {}

# https://jsr.io/@scope/a/1.0.0/foo.d.ts
export class Test {
}

# https://jsr.io/@scope/a/1.0.0/foo.js
// @ts-self-types="./foo.d.ts"
export class Test {}

# mod.ts
import 'jsr:@scope/a'
import 'jsr:@scope/a/foo'

# output
{
  "roots": [
    "file:///mod.ts"
  ],
  "modules": [
    {
      "kind": "esm",
      "dependencies": [
        {
          "specifier": "jsr:@scope/a",
          "code": {
            "specifier": "jsr:@scope/a",
            "resolutionMode": "import",
            "span": {
              "start": {
                "line": 0,
                "character": 7
              },
              "end": {
                "line": 0,
                "character": 21
              }
            }
          }
        },
        {
          "specifier": "jsr:@scope/a/foo",
          "code": {
            "specifier": "jsr:@scope/a/foo",
            "resolutionMode": "import",
            "span": {
              "start": {
                "line": 1,
                "character": 7
              },
              "end": {
                "line": 1,
                "character": 25
              }
            }
          }
        }
      ],
      "size": 48,
      "mediaType": "TypeScript",
      "specifier": "file:///mod.ts"
    },
    {
      "kind": "esm",
      "size": 22,
      "mediaType": "Dts",
      "specifier": "https://jsr.io/@scope/a/1.0.0/foo.d.ts"
    },
    {
      "kind": "esm",
      "size": 52,
      "typesDependency": {
        "specifier": "./foo.d.ts",
        "dependency": {
          "specifier": "https://jsr.io/@scope/a/1.0.0/foo.d.ts",
          "span": {
            "start": {
              "line": 0,
              "character": 18
            },
            "end": {
              "line": 0,
              "character": 30
            }
          }
        }
      },
      "mediaType": "JavaScript",
      "specifier": "https://jsr.io/@scope/a/1.0.0/foo.js"
    },
    {
      "kind": "esm",
      "dependencies": [
        {
          "specifier": "./other.d.ts",
          "type": {
            "specifier": "https://jsr.io/@scope/a/1.0.0/other.d.ts",
            "span": {
              "start": {
                "line": 0,
                "character": 22
              },
              "end": {
                "line": 0,
                "character": 36
              }
            }
          }
        }
      ],
      "size": 283,
      "mediaType": "Dts",
      "specifier": "https://jsr.io/@scope/a/1.0.0/mod.d.ts"
    },
    {
      "kind": "esm",
      "size": 58,
      "typesDependency": {
        "specifier": "./mod.d.ts",
        "dependency": {
          "specifier": "https://jsr.io/@scope/a/1.0.0/mod.d.ts",
          "span": {
            "start": {
              "line": 0,
              "character": 21
            },
            "end": {
              "line": 0,
              "character": 33
            }
          }
        }
      },
      "mediaType": "JavaScript",
      "specifier": "https://jsr.io/@scope/a/1.0.0/mod.js"
    },
    {
      "kind": "esm",
      "size": 22,
      "mediaType": "Dts",
      "specifier": "https://jsr.io/@scope/a/1.0.0/other.d.ts"
    }
  ],
  "redirects": {
    "jsr:@scope/a": "https://jsr.io/@scope/a/1.0.0/mod.js",
    "jsr:@scope/a/foo": "https://jsr.io/@scope/a/1.0.0/foo.js"
  },
  "packages": {
    "@scope/a@*": "@scope/a@1.0.0"
  }
}

Fast check https://jsr.io/@scope/a/1.0.0/foo.d.ts:
  {}
  export class Test {
  }
  --- DTS ---
  export declare class Test {
  }

Fast check https://jsr.io/@scope/a/1.0.0/mod.d.ts:
  {}
  export class Test {
    prop: typeof random;
    method(): typeof public;
    static prop: number;
  }
  declare function random(): number;
  declare var public: number;
  --- DTS ---
  export declare class Test {
    prop: typeof random;
    method(): typeof public;
    static prop: number;
  }
  declare function random(): number;
  declare var public: number;
