-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
fix(core): add missing properties in subschemas to fix TS error #1115
Conversation
@melloware could you please guide on what's missing here to get it merged? |
The build is failing with "Code style issues found in 25 files. Forgot to run Prettier?" |
Signed-off-by: Olzhas Alexandrov <[email protected]>
@melloware in terms of prettier, I see there are multiple versions installed (see screenshot) To fix formatting, we should consider to either:
Or run formatting in a separate PR. |
@Maxim-Mazurok weren't you proposing something like what @o-alexandrov is asking above? |
I'm pretty sure formatting was fine in the whole project on my PRs. And I may have added prettier checks into CI pipeline to keep it that way. Maybe someone pushed directly into master unformatted code without going through a PR? That would explain unformatted code. Multiple prettier versions shouldn't be an issue, there's a command to do the formatting in the root project I believe. Hope this helps. Regarding review I might take a look sometime, but can't promise. |
And IMO - just format it. If it's a really big PR then do another formatting PR, then after it's merged do this one. We can't just merge with failing CI. |
I didn't claim multiple versions of prettier is an issue in the formatting itself.
For your convenience, I'll add a separate PR to fix formatting and then rebase this PR, so this PR contains only related changes to the title EDIT: formatting regression is addressed in #1117 |
closes #935
Status
READY
Description
Fixes TypeScript error when accessing a property from a union of objects with different schema.
Please refer to the provided example error in #935
Todos
Steps to Test or Reproduce
Run locally to observe the generated types changed (now have missing properties declared as
missingProperty?: never
in:-
samples/react-query/basic/src/api/model/dog.ts
-
samples/react-query/basic/src/api/model/pet.ts
Screenshots of the changes