-
Notifications
You must be signed in to change notification settings - Fork 198
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: Unknown node "Primitive" (ts.SyntaxKind = 162) in specific Type example #1790
Comments
I have also tried |
This could be some issue with recursiveness. Unfortunately we'll need a more specific repo with a minimal example for anyone to be a me to fix this. I'll close the issue but feel free to continue commenting on it here. |
@domoritz There you go: https://github.com/Philzen/ts-json-schema-generator-bug-1790 I included both examples, just run Kindly reopen this issue once you've confirmed this is an unresolved bug. |
Thank you for the repo. Can you make it minimal by removing all types that are not contributing to the bug. This will greatly help anyone who is going to try to debug this issue. I would recommend deleting types until the bug disappears. I'll reopen for now but note that the repro is not minimal yet. |
Validation still has a lot of types. Have you been able to narrow down the issue? |
@domoritz As far as i can tell, not a single type can be removed from ’Validation’ – the type is composed from them and it was a considerable amount of work to pull them together in a single file from the referenced react lib. At the end of the day, the use case would be to reference the type from the original lib directly, that file was merely a way of narrowing it down and trying to reproduce it with a local extract of it. |
Absolutely. Hopefully this repro helps someone narrow down the issue to find a fix. |
Initially i though the type i wanted to import simply had a too complex module hierarchy and i'd be missing something.
I wanted to use
{ RegisterOptions } from 'react-hook-forms'
and after i found out with type packages i was missing and how to configure atsconfig.ts
withtypeRoots
is ended up with an error message. So i extracted the type into a single file and still ended up with the same error message as below:Full content of `validation.d.ts`:
As you can see, the type
Primitive
is clearly defined in line 45. The whole file validates fine in VSCode, all types are well defined. Is there anything else i may be doing wrong?The text was updated successfully, but these errors were encountered: