Closed
Description
π Search Terms
index signature any
π Version & Regression Information
- This changed between versions 5.7.0-dev.20240923 and 5.7.0-dev.20240924
- This probably changed in PR Support interpreting non-literal computed properties in classes as implicit index signaturesΒ #59860
β― Playground Link
π» Code
const AnyClass = class {} as any;
export class Cls extends AnyClass { }
π Actual behavior
The declaration for the class contains a static index signature:
declare const AnyClass: any;
export declare class Cls extends AnyClass {
static [x: string]: any;
}
π Expected behavior
The declaration for the class does not contain the index sigature as in TS 5.6 and before:
declare const AnyClass: any;
export declare class Cls extends AnyClass {
}
Additional information about the issue
This means this declaration file can't be emitted in isolated declarations.