Use Enum Values from backend in the Frontend
I'm using this enum in my backend:
I understand I can infer the types of enums with trpc and use those types in the Frontend like this:
type YouthProtection = RouterInputs['api']['update']['payload']['youthProtection']
.
I would like to understand if there is a way to use the inferred enum as a Value in the frontend, something like this:
YouthProtection.Zero
1 Reply
why not just
VideoYouthProtectionEnum.Zero
?
(import it in the frontend)