Skip to content

Error: referenced directly or indirectly in its own type annotation. ts(2502) #180

Open
@huan

Description

@huan

I'm using TypeScript 4.5 and still get ts(2502) error.

Code:

const func = (test: Test) => ({ ...test });

interface Test {
  test: ReturnType<typeof func>;
}

Minimum reproducible code sandbox:

Related issue:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions