Skip to content

Debug Failure when emitting declaration for unresolved type constraints #12326

@HerringtonDarkholme

Description

@HerringtonDarkholme

TypeScript Version: nightly, --declaration

Code

// @declaration
type A<T extends Unknown> = {}

Expected behavior:
Report Cannot find name 'Unknown'

Actual behavior:

Debug Failure. This is unknown parent for type parameter.

N.B. the actual bug is much more subtle. I encounter this when a type alias is bound by a type imported from a library. The actual bug is a compiler crash.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions