-
Notifications
You must be signed in to change notification settings - Fork 9
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
0.0.10 breaking code inspection in WebStorm #12
Comments
Thanks for reporting. Unfortunately I don't have WebStorm so can't test, but I would be surprised if it were truly localized to WebStorm. Did you try VS Code? It could be a regression in the published |
The issue is present but slightly different in VS Code—rather than breaking overall code inspection, the interpreter throws errors re: the output of |
I am getting this error when running Interface 'ZodClass<Members, Instance, Shape>' incorrectly extends interface 'ZodType<Instance, ZodTypeDef, Instance>'.
The types returned by 'safeParse(...)' are incompatible between these types.
Type 'SafeParseReturnType<unknown, Instance>' is not assignable to type 'SafeParseReturnType<Instance, Instance>'.
Type 'SafeParseError<unknown>' is not assignable to type 'SafeParseReturnType<Instance, Instance>'.
Type 'SafeParseError<unknown>' is not assignable to type 'SafeParseError<Instance>'.
The types returned by 'error.format()' are incompatible between these types.
Type 'ZodFormattedError<unknown, string>' is not assignable to type 'ZodFormattedError<Instance, string>'.
Type 'ZodFormattedError<unknown, string>' is not assignable to type 'recursiveZodFormattedError<NonNullable<Instance>>'.ts(2430) |
Possibly related to the recent discovery re: returning a class instance with a proper reference to
this
, code inspection and completion in WebStorm is struggling to understand not onlyzod-class
instances and methods, but also JS/TS code in general. Upon reverting to0.0.9
, the issue is resolved in multiple versions of WebStorm.The text was updated successfully, but these errors were encountered: