createTRPCEndpoint, the returned procedure loses the type definition of input.createTRPCEndpoint has no utility, but we use it to dynamically create middleware that are configured by the options we pass in. It would be important to be able to enrich the procedure ctx type with the middleware. If we didn't, we could override and cast the return type of createTRPCEndpoint as T, and then the type safety of input is preserved, but then we can't enrich ctx.