Skip to content

Regression in v3 (2) #14809

@fisker

Description

@fisker

Prettier pr-14803
Playground link

--parser typescript

Input:

 a = {
   parseFunctionBodyAndFinish<
    T extends
        | N.Function
        | N.TSDeclareMethod
        | N.TSDeclareFunction
        | N.ClassPrivateMethod,
  >() {
  }
 }

Output: (extra new line added after extends)

a = {
  parseFunctionBodyAndFinish<
    T extends

        | N.Function
        | N.TSDeclareMethod
        | N.TSDeclareFunction
        | N.ClassPrivateMethod,
  >() {},
};

Expected behavior:

(V2 output should be preferred)

a = {
  parseFunctionBodyAndFinish<
    T extends
      | N.Function
      | N.TSDeclareMethod
      | N.TSDeclareFunction
      | N.ClassPrivateMethod
  >() {},
};

Maybe the same problem as #14808

https://github.com/babel/babel/pull/15617/files#r1187671748

Metadata

Metadata

Assignees

Labels

lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions