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
Based on my experience with complex types and other libraries, I would prefer to maintain my type definitions separate from the Rescript Schema schema definitions. However, I obviously need to make sure that the types and schemas are in sync, so I setup type assertions using a utility type that will throw type errors if the types are not equivalent.
However, because S.optional indicates the property can accept 'undefined' values, but does not actually indicate the property itself is optional, these assertions fail in those cases.
I am not entirely sure if this can be solved, but I thought it was worth bringing up.
The text was updated successfully, but these errors were encountered:
Based on my experience with complex types and other libraries, I would prefer to maintain my type definitions separate from the Rescript Schema schema definitions. However, I obviously need to make sure that the types and schemas are in sync, so I setup type assertions using a utility type that will throw type errors if the types are not equivalent.
However, because S.optional indicates the property can accept 'undefined' values, but does not actually indicate the property itself is optional, these assertions fail in those cases.
I am not entirely sure if this can be solved, but I thought it was worth bringing up.
The text was updated successfully, but these errors were encountered: