Skip to content

Compiler crashes when emitting declaration for malformed interface  #12291

Closed
@HerringtonDarkholme

Description

@HerringtonDarkholme

TypeScript Version: nightly, with --declaration flag, also reproducable with stable version
Code

// @declaration
class A {}
interface Class extends (typeof A) {}

Expected behavior:
Report error like without --declaration flag.

Actual behavior:
Crashes with Cannot read property 'heritageClauses' of undefined in writeInterfaceDeclaration

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions