Reactjs – TypeScript: Generic function return type inference issue with zod schema validation
I'm using the zod library for schema validation and have defined two schemas: FormFactorDevice and FormFactor. I've also implemented a selectFormFactorDevice function to select a value from the FormFactorDevice object based on a given deviceType. However, the return value of…