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

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

# https://jsr.io/@scope/a/1.0.0/mod.ts
class BaseHandler {
}

class Public {
}

class Private {}

namespace Test {
  export class A {}
  // should not include this
  export class B {}
}

export const handlers = {
  BaseHandler,
  Private: Public,
  C: Test.A,
};

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

# https://jsr.io/@scope/b/1.0.0_meta.json
{ "exports": { ".": "./mod.ts" } }

# https://jsr.io/@scope/b/1.0.0/mod.ts
class BaseHandler {
}

namespace Test {
  export class A {}
  // should not include this
  export class B {}
}

export function test(
  a = BaseHandler,
  C = Test.A,
) {
}

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

# 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/b",
          "code": {
            "specifier": "jsr:@scope/b",
            "resolutionMode": "import",
            "span": {
              "start": {
                "line": 1,
                "character": 7
              },
              "end": {
                "line": 1,
                "character": 21
              }
            }
          }
        }
      ],
      "size": 44,
      "mediaType": "TypeScript",
      "specifier": "file:///mod.ts"
    },
    {
      "kind": "esm",
      "size": 224,
      "mediaType": "TypeScript",
      "specifier": "https://jsr.io/@scope/a/1.0.0/mod.ts"
    },
    {
      "kind": "esm",
      "size": 173,
      "mediaType": "TypeScript",
      "specifier": "https://jsr.io/@scope/b/1.0.0/mod.ts"
    }
  ],
  "redirects": {
    "jsr:@scope/a": "https://jsr.io/@scope/a/1.0.0/mod.ts",
    "jsr:@scope/b": "https://jsr.io/@scope/b/1.0.0/mod.ts"
  },
  "packages": {
    "@scope/a@*": "@scope/a@1.0.0",
    "@scope/b@*": "@scope/b@1.0.0"
  }
}

Fast check https://jsr.io/@scope/a/1.0.0/mod.ts:
  {}
  class BaseHandler {
  }
  class Public {
  }
  namespace Test {
    export class A {
    }
  }
  export const handlers = {
    BaseHandler,
    Private: Public,
    C: Test.A
  };
  --- DTS ---
  declare class BaseHandler {
  }
  declare class Public {
  }
  declare namespace Test {
    export class A {
    }
  }
  export declare const handlers: {
    readonly Private;
    readonly C;
  };
  --- DTS Diagnostics ---
  unable to infer type from object property, skipping
      at https://jsr.io/@scope/a/1.0.0/mod.ts@176
Fast check https://jsr.io/@scope/b/1.0.0/mod.ts:
  {}
  class BaseHandler {
  }
  namespace Test {
    export class A {
    }
  }
  export function test(a = BaseHandler, C = Test.A): void {}
  --- DTS ---
  declare class BaseHandler {
  }
  declare namespace Test {
    export class A {
    }
  }
  export declare function test(a?: any, C?: any): void;
  --- DTS Diagnostics ---
  unable to infer type, falling back to any type
      at https://jsr.io/@scope/b/1.0.0/mod.ts@140

  unable to infer type, falling back to any type
      at https://jsr.io/@scope/b/1.0.0/mod.ts@159
