Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

Type parameters in object literal methods get extra unnecessary suffix in declaration files #3968

Closed

Description

Steps to reproduce

export const o = {
    foo<M extends string>(): void { },
    bar<M extends string>(): void { },
};

Playground Link

Behavior with typescript@6.0

Each type parameter M has the name as they were written

export declare const o: {
    foo<M extends string>(): void;
    bar<M extends string>(): void;
};

Behavior with tsgo

Second type parameter is renamed to M_1

export declare const o: {
    foo<M extends string>(): void;
    bar<M_1 extends string>(): void;
};

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions