Bean
Bean8mo ago

type safety with meta

how do I get the meta types to work correctly?
No description
No description
4 Replies
Bean
BeanOP8mo ago
I want the authRequired type to automatically infer the correct type for the context in my protectedProcedure, I have the isAuthed middleware set up to throw an error if the meta is set to true, but that type doesnt work in my procedure and the usermodel type is still nullable how can I fix that?
Alex / KATT 🐱
Just don't use meta here
Bean
BeanOP8mo ago
how do I set this up then?
Alex / KATT 🐱
Use protected procedures for protected ones and public for non protected ones