What's the type of errorFormatter parameter
I wanna know how could i get the type of the errorFormatter parameter, so i can move the errorFormatter logic to another file.
Environment: Node v18.15.0
2 Replies
Right click and go to type definition then start copying things out, if any types you need aren’t already exported then open a GitHub issue and we can do it if it’s sensible
For others looking for the type, i believe it is
ErrorFormatter<Context, DefaultErrorShape>
Error related types can be found in @trpc/server/dist/error/formatter
I think this would be the way to extend the default error shape