orval
orval copied to clipboard
React Query: Regression in 6.25.0 caused by #1207
Regression caused by https://github.com/anymaniax/orval/issues/1207
@soartec-lab this broke React Query in 6.25.0 I now get these TypeScript errors.
Line 26:40: Don't use `{}` as a type. `{}` actually means "any non-nullish value".
- If you want a type meaning "any object", you probably want `object` instead.
- If you want a type meaning "any value", you probably want `unknown` instead.
in 6.24.0 code was this
export interface FilterConstraint {
/** Filter match mode e.g. equals, notEquals, contains, notContains, gt, gte, lt, lte */
matchMode?: string;
/** Value to filter this column by */
value?: unknown;
}
in 6.25.0 its this...
/**
* Value to filter this column by
*/
export type FilterConstraintValue = {};
export interface FilterConstraint {
/** Filter match mode e.g. equals, notEquals, contains, notContains, gt, gte, lt, lte */
matchMode?: string;
/** Value to filter this column by */
value?: FilterConstraintValue;
}
Which is now broken.
@melloware
Wow, the value of type is now {} instead of unknown. Could you please provide a schema that reproduces the problem?
Attached in the zip file is my openapi.json and orval.ts config!
orval-1227.zip
thanks!
Just an FYI this is my public project where I use Orval and detected the issue: https://github.com/melloware/quarkus-primereact
Thank you. I haven't had time recently, but I think I'll be able to respond next week.