Skip to content

Commit

Permalink
use token_decorated_with_space
Browse files Browse the repository at this point in the history
  • Loading branch information
minht11 committed Apr 28, 2024
1 parent 0683433 commit cadb20f
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,7 @@ fn convert_to_array_type(
length => {
let ts_union_type_builder = make::ts_union_type(make::ts_union_type_variant_list(
types_array,
(0..length - 1).map(|_| {
make::token(T![|])
.with_leading_trivia([(TriviaPieceKind::Whitespace, " ")])
.with_trailing_trivia([(TriviaPieceKind::Whitespace, " ")])
}),
(0..length - 1).map(|_| make::token_decorated_with_space(T![|])),
));
return Some(AnyTsType::TsUnionType(ts_union_type_builder.build()));
}
Expand Down

0 comments on commit cadb20f

Please sign in to comment.