Closed justin0mcateer closed 1 year ago
Could you provide an example using https://github.com/colinhacks/zod. Even if it's not possible with the current API, I can add support for this in the next version.
Are you referring to something like this? https://github.com/colinhacks/zod#intersections
Yes, precisely.
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Dmitry Zakharov @.> Sent: Monday, July 3, 2023 3:56:59 PM To: DZakh/rescript-struct @.> Cc: justin0mcateer @.>; Author @.> Subject: Re: [DZakh/rescript-struct] Intersection Types (Issue #60)
Are you referring to something like this? https://github.com/colinhacks/zod#intersections
— Reply to this email directly, view it on GitHubhttps://github.com/DZakh/rescript-struct/issues/60#issuecomment-1619143194, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAT4Q7MZOVNOYPWIHWAMEYDXOMWZXANCNFSM6AAAAAAZ4UUWMA. You are receiving this because you authored the thread.Message ID: @.***>
I'll add it in the V5.1
Apologies in advance if this is an ignorant question, I am not really very familiar with Rescript, I am trying out using the library via the TypeScript API.
Is there anyway to re-use parts of the schema, which are not themselves fields, eg a group of fields? In my mind this would be analogous to a mix-in or how you might use 'intersection' algebraic types in TypeScript