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

Add getters to Map for key + value? #2356

Merged
merged 1 commit into from
May 22, 2023
Merged

Conversation

bbar
Copy link
Contributor

@bbar bbar commented Apr 20, 2023

For Records we have access to keySchema and valueSchema, like this:

const schema = z.record(z.string(), z.number());
console.log({
  key: schema.keySchema,
  value: schema.valueSchema,
});

I've added the same methods to Map so users don't have to use _def.keyType and _def.valueType.

@netlify
Copy link

netlify bot commented Apr 20, 2023

Deploy Preview for guileless-rolypoly-866f8a ready!

Name Link
🔨 Latest commit f5a0c0a
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/646ac24c7f935b0008ef2917
😎 Deploy Preview https://deploy-preview-2356--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@colinhacks
Copy link
Owner

Beautiful, thanks!

@colinhacks colinhacks merged commit 4f75cbc into colinhacks:master May 22, 2023
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