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
I'm interested in updating the Custom Schemas example in the documentation. The function type takes in an unknown, so the example casts the value to a string in order to operate on it with a RegExp
I want to propose using Type Narrowing. It's helped me catch errors from validating a non-expected type, and I believe it would help others as well as a good practice with interacting with the unknown type.
Hi,
I'm interested in updating the Custom Schemas example in the documentation. The function type takes in an unknown, so the example casts the value to a string in order to operate on it with a RegExp
I want to propose using Type Narrowing. It's helped me catch errors from validating a non-expected type, and I believe it would help others as well as a good practice with interacting with the unknown type.
Please let me know if this is a welcome change. I can make a fork of the repo and create a PR!
The text was updated successfully, but these errors were encountered: