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
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