I am wondering if there is a way to create types that are verified by a function in Typescript/React.
Instead of a \'string\' type for example, I would like it to be