Skip to content

Index signature added to classes that inherit an any typed classΒ #60383

Closed
@dragomirtitian

Description

@dragomirtitian

πŸ”Ž Search Terms

index signature any

πŸ•— Version & Regression Information

⏯ Playground Link

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.

Metadata

Metadata

Assignees

Labels

Fix AvailableA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions