Skip to content

Commit

Permalink
fix(formatter): Line breaking after extends in type parameters (#876)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuiki authored and ematipico committed Nov 26, 2023
1 parent 23c477c commit 44e7d85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ impl FormatNodeRule<TsTypeConstraintClause> for FormatTsTypeConstraintClause {

let extends = extends_token.format();
let ty = ty.format();
write![f, [extends, space(), ty]]
let group_id = f.group_id("constraint");
write![
f,
[
extends,
group(&indent(&soft_line_break_or_space())).with_group_id(Some(group_id)),
indent_if_group_breaks(&ty, group_id)
]
]
}
}

This file was deleted.

0 comments on commit 44e7d85

Please sign in to comment.