Skip to content

How to print anonymous recursive types #463

Closed
@JsonFreeman

Description

@JsonFreeman
var a: { foo: typeof a; }

a has a recursive type. If we try to print this type, it prints { foo: any; }, but it does not behave as such in type comparisons. So we are lying when we print it.

When fixing this, it's important to consider both displaying a type to the user, and generating .d.ts files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions