Skip to content

Allow type aliases to reference themselves in type argument positions #35017

Open

Description

TypeScript Version: 3.8.0-dev.20191105

Search Terms:
circular

Code

type A<T> = { x: T }
type R = A<R> // FAIL

type B = { x: B } // OK

Expected behavior:
Both cases throw no error.

Actual behavior:
Type R is rejected due to a circular reference.

Playground Link:
Link

Related Issues:
#33050

Regression: #33050 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions