Using TRPC v11. I am failing to return the type. I get the error Type alias 'ProtectedProcedureType' circularly references itself.
Any ideas? This is my code
type ProtectedProcedureType = inferProcedureBuilderResolverOptions< typeof protectedProcedure>;export type ProtectedProcedureContext = ProtectedProcedureType["ctx"];
type ProtectedProcedureType = inferProcedureBuilderResolverOptions< typeof protectedProcedure>;export type ProtectedProcedureContext = ProtectedProcedureType["ctx"];
I need the type to be reusable in other files.
I also tried this
type ProtectedProcedure = typeof protectedProcedure type ProtectedProcedureOptions = Parameters<Parameters<ProtectedProcedure['query']>[0]>[0]export type ProtectedProcedureContext = ProtectedProcedureOptions['ctx']
type ProtectedProcedure = typeof protectedProcedure type ProtectedProcedureOptions = Parameters<Parameters<ProtectedProcedure['query']>[0]>[0]export type ProtectedProcedureContext = ProtectedProcedureOptions['ctx']