dprint-plugin-typescript icon indicating copy to clipboard operation
dprint-plugin-typescript copied to clipboard

Code requires format twice in scenario with long union type in interface extends clause

Open dsherret opened this issue 4 years ago • 0 comments

Describe the bug

Deno version: 1.3.2

Input Code

export interface Preview extends Pick<BaseGuild, "id" | "name" | "icon" | "splash" | "discovery_splash" | "emojis" | "features" | "description"> {
  approximate_member_count: number;
  approximate_presence_count: number;
}

Actual Output

First this:

  export interface Preview
    extends
      Pick<
        BaseGuild,
        | "id"
        | "name"
        | "icon"
        | "splash"
        | "discovery_splash"
        | "emojis"
        | "features"
        | "description"
      > {
    approximate_member_count: number;
    approximate_presence_count: number;
  }

Then this the second time:

  export interface Preview extends
    Pick<
      BaseGuild,
      | "id"
      | "name"
      | "icon"
      | "splash"
      | "discovery_splash"
      | "emojis"
      | "features"
      | "description"
    > {
    approximate_member_count: number;
    approximate_presence_count: number;
  }

From https://discordapp.com/channels/684898665143206084/689420767620104201/751042524310667334

dsherret avatar Sep 07 '20 14:09 dsherret