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

New type assertion function, largely from current GH Issues #33

Merged
merged 2 commits into from
May 30, 2023

Conversation

abelsj60
Copy link
Contributor

@abelsj60 abelsj60 commented May 7, 2023

Hi @rileytomasek .

Really like Zodix, but I'm having a problem with this now classic issue:

[BUG] TypeError: keyValidator._parse is not a function

I saw a type assertion proposed at one point, but the PR was eventually closed without merging. I've updated it and am re-proposing it. I changed the is type, as the original made TypeScript scream. I know you mentioned not loving this resolution, I'm not really sure why, but I did ask in the Zod Discord for ideas generally. No takers.

I think this'll work and I'd rather push it here than copy Zodix into my project (Remix 1.12).

I think I've updated all your various parse functions. The tests pass. Does this suit?

(Or did I miss something amiss with the original PR that I've replicated?)

-j

@rileytomasek
Copy link
Owner

Thanks @abelsj60! Sorry for the delayed response — I missed the notification.

There are still several ways this could go wrong, like a non-zod object with a parse function, but I don't think any of them really matter and will result in an error that you will notice right away.

@rileytomasek rileytomasek merged commit 2d15ee3 into rileytomasek:master May 30, 2023
@rileytomasek
Copy link
Owner

@abelsj60
Copy link
Contributor Author

Thanks, @rileytomasek. I guess you're right about the errors, I wasn't thinking big enough.

Too focused on Zod. That'd make Richard Lester happy. Maybe Donner, too. Certainly Michael Shannon. I mean, who would have thought Zod would still be a key summer blockbuster character in 2023, and yet, here we are. But I digress.

Thanks for the merge. I'm kinda relying on Zodix right now, and may ping again with a question or two about expansion. Not sure, yet.

-j

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

Successfully merging this pull request may close these issues.

2 participants