-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Object with any
breaks .with
chaining
#197
Comments
any
breaks .with chainingany
breaks .with
chaining
|
That's unfortunately coming from this weird TypeScript behavior: type X = Exclude<{ unit: any }, { readonly unit: 'day' }>;
// ^? never I would expect I don't know if there is a fix for this that would be satisfactory in terms of type-checking performance (for example that wouldn't require walking through the input types to find anys and turn them into unknowns). |
Is there a workaround or a solution for this? |
Use |
Describe the bug
Codegen generates type defs that includes
any
as object property types.ts-pattern
.with
chaining breaks when trying to match against those objects.Code Sandbox with a minimal reproduction case
https://codesandbox.io/p/sandbox/misty-bird-wsckjn
Versions
The text was updated successfully, but these errors were encountered: