You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we have derived types where we use the Omit utility type. This is often where you have some canonical type and you need some version where certain fields are not provided, for example 'id' or 'updatedAt' where those two fields are automatically generated and not accepted in the input from the client. Particularly when there are multiple derived types, it is easier to start with the full/canonical type then remove/omit certain fields to created the derived types.
Could be my ignorance, but I cannot see a way to accomplish this with Rescript Schema currently.
For reference Zod offers both 'pick' and 'omit' functions to provide this capability.
The text was updated successfully, but these errors were encountered:
Sometimes we have derived types where we use the Omit utility type. This is often where you have some canonical type and you need some version where certain fields are not provided, for example 'id' or 'updatedAt' where those two fields are automatically generated and not accepted in the input from the client. Particularly when there are multiple derived types, it is easier to start with the full/canonical type then remove/omit certain fields to created the derived types.
Could be my ignorance, but I cannot see a way to accomplish this with Rescript Schema currently.
For reference Zod offers both 'pick' and 'omit' functions to provide this capability.
The text was updated successfully, but these errors were encountered: