0

I have code with functions of this format:

export const loginService = async ({ email, password }: { email: string; password: string }) => {}

I want all these functions to be formatted in this manner:

export const loginService = async ({ email, password }: { 
   email: string;
   password: string 
}): Promise<ApiResponse> => {}

So that the input object remains in one line but its type definition gets separated into separate lines, like how an interface is divided. Is there a way to configure this using prettier?

ishiz
  • 61
  • 5
  • 1
    No, there isn't. Prettier is pretty opinionated. If you don't like how it formats code, don't use it. Better yet, create your own! – kelsny Mar 01 '23 at 15:01
  • @vr. yeah, creating one seems like the only solution here lol – ishiz Mar 02 '23 at 08:36

0 Answers0