# 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
export function test1() {}
export function test2(): number {
  return 2;
}
/** Some Doc **/
export function test3(param: number): number {
}
export function test4(param = 2): number {
  return 1;
}
export function test5<T extends PublicOther>(param = 2): T {
  return new PublicOther();
}
export function test6<T = PublicOther>(param: number = 2): T {
  return new PublicOther();
}
export function test7(param?: number): number;
export function test7(param?: number, param2?: PublicOther2): number;
export function test7(param: PrivateOther = new PrivateOther, param2?: string): PrivateOther {
  return new PublicOther();
}

function test8(param: number): number;
function test8(param: string): string;
function test8(param: string): string {
}

export { test8 };

export default function test9(param: number): number;
export default function test9(param: string): string;
export default function test9(param: string): string {
}

export function test10(...params: string[]): string[] {
  return params;
}

// should support leaving this expr as-is
export function test11(options = { copy: true }) {
}

export interface GlobOptions {
}
const privateBool = false;
export function test12({ globstar = privateBool }: GlobOptions = {}) {
}
const private1 = 1;
export function test13([test = private1]: number[] = [1 , 2]) {
}

export function test14(): never {
  throw new Error("test");
}

export function* test15(): Generator<number> {
  yield 1;
}

class PublicOther {
}
class PublicOther2 {
}

class PrivateOther {}

class PublicDeclareFunc {}
export declare function declareFunc(param: number): number;
export declare function declareFunc(param: string): string;
export declare function declareFunc(param: PublicDeclareFunc): string;

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

# 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
              }
            }
          }
        }
      ],
      "size": 22,
      "mediaType": "TypeScript",
      "specifier": "file:///mod.ts"
    },
    {
      "kind": "esm",
      "size": 1735,
      "mediaType": "TypeScript",
      "specifier": "https://jsr.io/@scope/a/1.0.0/mod.ts"
    }
  ],
  "redirects": {
    "jsr:@scope/a": "https://jsr.io/@scope/a/1.0.0/mod.ts"
  },
  "packages": {
    "@scope/a@*": "@scope/a@1.0.0"
  }
}

Fast check https://jsr.io/@scope/a/1.0.0/mod.ts:
  {}
  export function test1(): void {}
  export function test2(): number {
    return {} as never;
  }
  /** Some Doc **/ export function test3(param: number): number {
    return {} as never;
  }
  export function test4(param?: number): number {
    return {} as never;
  }
  export function test5<T extends PublicOther>(param?: number): T {
    return {} as never;
  }
  export function test6<T = PublicOther>(param?: number): T {
    return {} as never;
  }
  export function test7(param?: number): number;
  export function test7(param?: number, param2?: PublicOther2): number;
  export function test7(param0?: any, param1?: any): any {
    return {} as never;
  }
  function test8(param: number): number;
  function test8(param: string): string;
  function test8(param0?: any): any {
    return {} as never;
  }
  export { test8 };
  export default function test9(param: number): number;
  export default function test9(param: string): string;
  export default function test9(param0?: any): any {
    return {} as never;
  }
  export function test10(...params: string[]): string[] {
    return {} as never;
  }
  export function test11(options = {
    copy: true
  }): void {}
  export interface GlobOptions {
  }
  export function test12({}: GlobOptions = {} as never): void {}
  export function test13([]: number[] = [] as never): void {}
  export function test14(): never {
    return {} as never;
  }
  export function test15(): Generator<number> {
    return {} as never;
  }
  class PublicOther {
  }
  class PublicOther2 {
  }
  class PublicDeclareFunc {
  }
  export declare function declareFunc(param: number): number;
  export declare function declareFunc(param: string): string;
  export declare function declareFunc(param: PublicDeclareFunc): string;
  --- DTS ---
  export declare function test1(): void;
  export declare function test2(): number;
  /** Some Doc **/ export declare function test3(param: number): number;
  export declare function test4(param?: number): number;
  export declare function test5<T extends PublicOther>(param?: number): T;
  export declare function test6<T = PublicOther>(param?: number): T;
  export declare function test7(param?: number): number;
  export declare function test7(param?: number, param2?: PublicOther2): number;
  declare function test8(param: number): number;
  declare function test8(param: string): string;
  export { test8 };
  export default function test9(param: number): number;
  export default function test9(param: string): string;
  export declare function test10(...params: string[]): string[];
  export declare function test11(options?: {
    copy: boolean;
  }): void;
  export interface GlobOptions {
  }
  export declare function test12({}?: GlobOptions): void;
  export declare function test13([]?: number[]): void;
  export declare function test14(): never;
  export declare function test15(): Generator<number>;
  declare class PublicOther {
  }
  declare class PublicOther2 {
  }
  declare class PublicDeclareFunc {
  }
  export declare function declareFunc(param: number): number;
  export declare function declareFunc(param: string): string;
  export declare function declareFunc(param: PublicDeclareFunc): string;
