-
Notifications
You must be signed in to change notification settings - Fork 328
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
Branded types with experimental Decoder module #608
Comments
I think this is correct. It is pretty much how it is implemented in this experimental branch gcanti/io-ts-types#127. You can use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
📖 Documentation
I read through #453 but haven't found an answer to the following questions regarding branded types or what the recommendation is for handling branded types. It reads to use refine or parse but I haven't understood how.
Branded primitives
Consider a string that matches a regex pattern should be branded. Is the following correct? It does work but I wonder if there is a recommended / better approach
Branded structures
Consider this codec and the corresponding type. How can you achieve a branded struct?
The text was updated successfully, but these errors were encountered: