Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
huan opened this issue Jan 20, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@huan
Copy link
Member

huan commented Jan 20, 2022

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:

@huan huan added the bug Something isn't working label Jan 20, 2022
@huan huan changed the title 'test' is referenced directly or indirectly in its own type annotation. ts(2502) Error: referenced directly or indirectly in its own type annotation. ts(2502) Jan 22, 2022
huan added a commit that referenced this issue Jan 22, 2022
* add sayable & post payloads, workaround for #180

* add sayable schemas etc.

* add tap mixin

* init post interface

* fix all unit tests (typing imports)

* 1.13.1

* export sayable payloads

* 1.13.2

* move type in post payload, add post event

* clean

* 1.13.3

* fix names & exports

* 1.13.4

* rename create -> publish

* clean

* 1.13.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant