Skip to content
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

feat: implement typed Input/Output interface for resolvers #753

Merged
merged 30 commits into from
Mar 31, 2025
Merged

Conversation

jorisre
Copy link
Member

@jorisre jorisre commented Feb 26, 2025

This PR implements typed Input/Output interfaces for resolvers, which needs react-hook-form/react-hook-form#12638

Next steps will involve extending this implementation to all applicable resolver modules.

Note: This PR will fail until the release of react-hook-form/react-hook-form#12638

Fixes #743

@controversial
Copy link

controversial commented Mar 6, 2025

@jorisre I believe I made some progress on the types here, in #755 and in react-hook-form/react-hook-form#12664

Let me know how it looks to you

@jorisre
Copy link
Member Author

jorisre commented Mar 26, 2025

I need some help fixing this TS issue. @bluebill1049 @controversial or @kotarella1110

Screenshot 2025-03-26 at 11 11 00

@kotarella1110
Copy link
Member

@jorisre

I need some help fixing this TS issue.

I've created a PR. Please feel free to merge it if you like it.

#757

Copy link
Contributor

github-actions bot commented Mar 27, 2025

Size Change: +1.72 kB (+3.17%)

Total Size: 55.8 kB

Filename Size Change
arktype/dist/arktype.js 675 B +310 B (+84.93%) 🆘
arktype/dist/arktype.mjs 687 B +308 B (+81.27%) 🆘
arktype/dist/arktype.modern.mjs 628 B +262 B (+71.58%) 🆘
arktype/dist/arktype.module.js 687 B +308 B (+81.27%) 🆘
arktype/dist/arktype.umd.js 756 B +293 B (+63.28%) 🆘
standard-schema/dist/standard-schema.js 609 B +2 B (+0.33%)
standard-schema/dist/standard-schema.mjs 627 B +2 B (+0.32%)
standard-schema/dist/standard-schema.modern.mjs 570 B +2 B (+0.35%)
standard-schema/dist/standard-schema.module.js 627 B +2 B (+0.32%)
standard-schema/dist/standard-schema.umd.js 708 B +3 B (+0.43%)
typeschema/dist/typeschema.js 526 B +47 B (+9.81%) ⚠️
typeschema/dist/typeschema.mjs 542 B +51 B (+10.39%) ⚠️
typeschema/dist/typeschema.modern.mjs 492 B +32 B (+6.96%) 🔍
typeschema/dist/typeschema.module.js 542 B +51 B (+10.39%) ⚠️
typeschema/dist/typeschema.umd.js 630 B +44 B (+7.51%) 🔍
yup/dist/yup.mjs 639 B -2 B (-0.31%)
yup/dist/yup.modern.mjs 579 B +5 B (+0.87%)
yup/dist/yup.module.js 639 B -2 B (-0.31%)
yup/dist/yup.umd.js 728 B -2 B (-0.27%)
ℹ️ View Unchanged
Filename Size
ajv/dist/ajv.js 692 B
ajv/dist/ajv.mjs 646 B
ajv/dist/ajv.modern.mjs 604 B
ajv/dist/ajv.module.js 646 B
ajv/dist/ajv.umd.js 803 B
class-validator/dist/class-validator.js 538 B
class-validator/dist/class-validator.mjs 559 B
class-validator/dist/class-validator.modern.mjs 511 B
class-validator/dist/class-validator.module.js 559 B
class-validator/dist/class-validator.umd.js 637 B
computed-types/dist/computed-types.js 385 B
computed-types/dist/computed-types.mjs 400 B
computed-types/dist/computed-types.modern.mjs 340 B
computed-types/dist/computed-types.module.js 400 B
computed-types/dist/computed-types.umd.js 476 B
dist/resolvers.js 444 B
dist/resolvers.mjs 454 B
dist/resolvers.module.js 454 B
dist/resolvers.umd.js 538 B
effect-ts/dist/effect-ts.js 536 B
effect-ts/dist/effect-ts.mjs 554 B
effect-ts/dist/effect-ts.modern.mjs 537 B
effect-ts/dist/effect-ts.module.js 554 B
effect-ts/dist/effect-ts.umd.js 652 B
fluentvalidation-ts/dist/fluentvalidation-ts.js 487 B
fluentvalidation-ts/dist/fluentvalidation-ts.mjs 505 B
fluentvalidation-ts/dist/fluentvalidation-ts.modern.mjs 434 B
fluentvalidation-ts/dist/fluentvalidation-ts.module.js 505 B
fluentvalidation-ts/dist/fluentvalidation-ts.umd.js 575 B
io-ts/dist/io-ts.js 1.27 kB
io-ts/dist/io-ts.mjs 1.15 kB
io-ts/dist/io-ts.modern.mjs 1.12 kB
io-ts/dist/io-ts.module.js 1.15 kB
io-ts/dist/io-ts.umd.js 1.39 kB
joi/dist/joi.js 590 B
joi/dist/joi.mjs 606 B
joi/dist/joi.modern.mjs 490 B
joi/dist/joi.module.js 606 B
joi/dist/joi.umd.js 694 B
nope/dist/nope.js 346 B
nope/dist/nope.mjs 363 B
nope/dist/nope.modern.mjs 330 B
nope/dist/nope.module.js 363 B
nope/dist/nope.umd.js 432 B
superstruct/dist/superstruct.js 339 B
superstruct/dist/superstruct.mjs 353 B
superstruct/dist/superstruct.modern.mjs 342 B
superstruct/dist/superstruct.module.js 353 B
superstruct/dist/superstruct.umd.js 437 B
typanion/dist/typanion.js 329 B
typanion/dist/typanion.mjs 345 B
typanion/dist/typanion.modern.mjs 325 B
typanion/dist/typanion.module.js 345 B
typanion/dist/typanion.umd.js 425 B
typebox/dist/typebox.js 501 B
typebox/dist/typebox.mjs 517 B
typebox/dist/typebox.modern.mjs 494 B
typebox/dist/typebox.module.js 517 B
typebox/dist/typebox.umd.js 618 B
valibot/dist/valibot.js 477 B
valibot/dist/valibot.mjs 492 B
valibot/dist/valibot.modern.mjs 452 B
valibot/dist/valibot.module.js 492 B
valibot/dist/valibot.umd.js 586 B
vest/dist/vest.js 479 B
vest/dist/vest.mjs 443 B
vest/dist/vest.modern.mjs 390 B
vest/dist/vest.module.js 443 B
vest/dist/vest.umd.js 568 B
vine/dist/vine.js 543 B
vine/dist/vine.mjs 553 B
vine/dist/vine.modern.mjs 484 B
vine/dist/vine.module.js 553 B
vine/dist/vine.umd.js 650 B
yup/dist/yup.js 626 B
zod/dist/zod.js 611 B
zod/dist/zod.mjs 629 B
zod/dist/zod.modern.mjs 565 B
zod/dist/zod.module.js 629 B
zod/dist/zod.umd.js 717 B

compressed-size-action

@jorisre jorisre marked this pull request as ready for review March 27, 2025 11:46
kotarella1110
kotarella1110 previously approved these changes Mar 27, 2025
Copy link
Member

@kotarella1110 kotarella1110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Appreciate your hard work!

@jorisre
Copy link
Member Author

jorisre commented Mar 27, 2025

LGTM! Appreciate your hard work!

Appreciate your help, thanks again!

Copy link
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks everyone! Huge effort @jorisre

bluebill1049
bluebill1049 previously approved these changes Mar 31, 2025
@jorisre jorisre changed the base branch from dev to master March 31, 2025 13:03
@jorisre jorisre dismissed stale reviews from bluebill1049 and kotarella1110 March 31, 2025 13:03

The base branch was changed.

@jorisre jorisre changed the base branch from master to dev March 31, 2025 13:03
@jorisre jorisre merged commit 6124c59 into dev Mar 31, 2025
4 checks passed
@jorisre jorisre deleted the fix/743 branch March 31, 2025 13:04
Copy link
Contributor

github-actions bot commented Apr 1, 2025

🎉 This PR is included in version 5.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@@ -11,7 +11,7 @@
"types": "dist/index.d.ts",
"license": "MIT",
"peerDependencies": {
"react-hook-form": "^7.0.0",
"react-hook-form": "7.55.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be locked to version 7.55.0?

Suggested change
"react-hook-form": "7.55.0",
"react-hook-form": "^7.55.0",

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @spiftire

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zod resolver infered types are incorect since 4.1.0
5 participants