-
Notifications
You must be signed in to change notification settings - Fork 25
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
Implement Zod schemas for Filters in utils [BOOST-4470] #514
Implement Zod schemas for Filters in utils [BOOST-4470] #514
Conversation
sammccord
commented
Aug 16, 2024
•
edited
Loading
edited
- Implement Zod schemas for Filters in utils
- Fix several explicit any's to resolve ts issues
- Update Mint params schema to match number or FilterOperator
- Update zod to support readonly usage in abitype
fix(utils): better zod lazy usage to fix type issues chore(utils): ignore esoteric arrayoperator type error chore(questdk): re-export zod schemas chore(types): address build issues for unknown / any types fix(utils): update zod to utilize abitype readonly chore: fix formatting
🦋 Changeset detectedLatest commit: 94b09f0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 52 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -12,6 +12,7 @@ | |||
"noImplicitOverride": true, | |||
"noUnusedLocals": true, | |||
"noUnusedParameters": true, | |||
"noImplicitAny": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was giving me guff trying to build, figured that at this point any any's we have right now are fine and we're unlikely to introduce a great deal more core functionality
| Primitive | ||
| FilterObject | ||
| FilterArray | ||
| FilterOperator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Quazia is this correct? I added the FilterOperator
to Filter
union type, and schema. Unsure if it's the move.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is correct - some of the issues before may have been from not having it in this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - this must have been a tough one 😅
Just for my edification why'd you end up casting the context as any when passing it through in the handlers?
| Primitive | ||
| FilterObject | ||
| FilterArray | ||
| FilterOperator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is correct - some of the issues before may have been from not having it in this.
The context type unions don't always overlap with the operator type unions, especially when it comes to |